|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.messages.DatagramMessage
This class defines a DatagramMessage
Constructor Summary | |
DatagramMessage(IpAddress sourceAddress,
IpAddress destinationAddress)
Creates a new DatagramMessage object |
Method Summary | |
byte[] |
getContent()
Returns the content value. |
int |
getContentSize()
Returns the message content size |
java.net.DatagramPacket |
getDatagramPacket()
Return the current message as a DatagramPacket to send. |
IpAddress |
getDestinationAddress()
Returns the destinationAddress value. |
static java.lang.Object |
getObjectFromDatagram(java.net.DatagramPacket datagram)
Return the content of this datagram as an object. |
IpAddress |
getSourceAddress()
Returns the sourceAddress value. |
static byte[] |
objectToBytes(java.io.Serializable obj)
Converts the given object to an array of bytes. |
void |
setContent(byte[] content)
Sets the content value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DatagramMessage(IpAddress sourceAddress, IpAddress destinationAddress)
DatagramMessage
object
sourceAddress
- source addressdestinationAddress
- destination addressMethod Detail |
public IpAddress getDestinationAddress()
public IpAddress getSourceAddress()
public byte[] getContent()
public void setContent(byte[] content)
content
- The content to set.public int getContentSize()
public java.net.DatagramPacket getDatagramPacket()
public static java.lang.Object getObjectFromDatagram(java.net.DatagramPacket datagram)
datagram
- the datagram to convert.
public static byte[] objectToBytes(java.io.Serializable obj)
obj
- the object to convert
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |