public class Packet
extends java.lang.Object
Constructor and Description |
---|
Packet()
null constructor for Hessian deserialization
|
Packet(java.lang.String to,
java.lang.String from)
Creates a packet with a destination and a source.
|
Modifier and Type | Method and Description |
---|---|
void |
dispatch(MessageStream handler,
MessageStream toSource)
SPI method to dispatch the packet to the proper handler
|
void |
dispatchError(MessageStream handler,
MessageStream toSource,
BamError error)
SPI method to dispatch the packet to the proper handler
|
java.lang.String |
getFrom()
Returns the 'from' field
|
java.lang.String |
getTo()
Returns the 'to' field
|
java.lang.String |
toString() |
public Packet()
public Packet(java.lang.String to, java.lang.String from)
to
- the destination addressfrom
- the source addresspublic final java.lang.String getTo()
public final java.lang.String getFrom()
public void dispatch(MessageStream handler, MessageStream toSource)
public void dispatchError(MessageStream handler, MessageStream toSource, BamError error)
public java.lang.String toString()
toString
in class java.lang.Object