public class RawData extends Object
Connector.
The following meta-data is included:
false)java.security.Principal object.| Modifier and Type | Field and Description |
|---|---|
byte[] |
bytes
The raw message.
|
| Constructor and Description |
|---|
RawData(byte[] data)
Deprecated.
Use one of the other constructors instead.
|
RawData(byte[] data,
InetAddress address,
int port)
Instantiates a new raw data.
|
RawData(byte[] data,
InetAddress address,
int port,
boolean multicast)
Instantiates a new raw data.
|
RawData(byte[] data,
InetAddress address,
int port,
Principal clientIdentity)
Instantiates a new raw data.
|
RawData(byte[] data,
InetAddress address,
int port,
Principal clientIdentity,
boolean multicast)
Instantiates a new raw data.
|
RawData(byte[] data,
InetSocketAddress address)
Instantiates a new raw data.
|
RawData(byte[] data,
InetSocketAddress address,
boolean multicast)
Instantiates a new raw data.
|
RawData(byte[] data,
InetSocketAddress address,
Principal clientIdentity)
Instantiates a new raw data.
|
RawData(byte[] data,
InetSocketAddress address,
Principal clientIdentity,
boolean multicast)
Instantiates a new raw data.
|
| Modifier and Type | Method and Description |
|---|---|
InetAddress |
getAddress()
Gets the address.
|
byte[] |
getBytes()
Gets the raw message.
|
InetSocketAddress |
getInetSocketAddress()
Gets the source/destination IP address and port.
|
int |
getPort()
Gets the port.
|
Principal |
getSenderIdentity()
Gets the identity of the sender of the message.
|
int |
getSize()
Gets the length of the serialized message
|
boolean |
isMulticast()
Checks if this is a multicast message
|
void |
setAddress(InetAddress newAddress)
Deprecated.
Use constructor instead.
|
void |
setMulticast(boolean multicast)
Deprecated.
Use constructor instead.
|
void |
setPort(int port)
Deprecated.
Use constructor instead.
|
public RawData(byte[] data)
data - the data that is to be sent or has been receivedpublic RawData(byte[] data,
InetSocketAddress address)
data - the data that is to be sent or has been receivedaddress - the IP address and port the data is to be sent to or has been received fromNullPointerException - if any of the given parameters is nullpublic RawData(byte[] data,
InetSocketAddress address,
Principal clientIdentity)
data - the data that is to be sent or has been receivedaddress - the IP address and port the data is to be sent to or has been received fromclientIdentity - the identity of the authenticated sender of the message
(or null if sender is not authenticated)NullPointerException - if any of the given parameters is nullpublic RawData(byte[] data,
InetAddress address,
int port)
data - the data that is to be sent or has been receivedaddress - the IP address the data is to be sent to or has been received fromport - the port the data is to be sent to or has been received fromNullPointerException - if data is nullpublic RawData(byte[] data,
InetAddress address,
int port,
Principal clientIdentity)
data - the data that is to be sent or has been receivedaddress - the IP address the data is to be sent to or has been received fromport - the port the data is to be sent to or has been received fromclientIdentity - the identity of the authenticated sender of the message
(or null if sender is not authenticated)NullPointerException - if data is nullpublic RawData(byte[] data,
InetSocketAddress address,
boolean multicast)
data - the data that is to be sent or has been receivedaddress - the IP address and port the data is to be sent to or has been received frommulticast - indicates whether the data represents a multicast messageNullPointerException - if data or address is nullpublic RawData(byte[] data,
InetSocketAddress address,
Principal clientIdentity,
boolean multicast)
data - the data that is to be sent or has been receivedaddress - the IP address and port the data is to be sent to or has been received fromclientIdentity - the identity of the authenticated sender of the message
(or null if sender is not authenticated)multicast - indicates whether the data represents a multicast messageNullPointerException - if data or address is nullpublic RawData(byte[] data,
InetAddress address,
int port,
boolean multicast)
data - the data that is to be sent or has been receivedaddress - the IP address the data is to be sent to or has been received fromport - the port the data is to be sent to or has been received frommulticast - indicates whether the data represents a multicast messageNullPointerException - if data is nullpublic RawData(byte[] data,
InetAddress address,
int port,
Principal clientIdentity,
boolean multicast)
data - the data that is to be sent or has been receivedaddress - the IP address the data is to be sent to or has been received fromport - the port the data is to be sent to or has been received fromclientIdentity - the identity of the authenticated sender of the message
(or null if sender is not authenticated)multicast - indicates whether the data represents a multicast messageNullPointerException - if data is nullpublic byte[] getBytes()
public int getSize()
public InetAddress getAddress()
public void setAddress(InetAddress newAddress)
newAddress - the new addresspublic int getPort()
public void setPort(int port)
port - the new portpublic boolean isMulticast()
public void setMulticast(boolean multicast)
multicast - whether this message is a multicast messagepublic InetSocketAddress getInetSocketAddress()
public Principal getSenderIdentity()
null if the
sender has not been authenticatedCopyright © 2019 Eclipse Foundation. All rights reserved.