|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.routing.kademlia.operation.OriginMessage
public abstract class OriginMessage
A message containing the origin node. This class can be subclassed to implement messages that contain more information.
| Constructor Summary | |
|---|---|
OriginMessage(DataInput in)
|
|
OriginMessage(Node origin)
|
|
| Method Summary | |
|---|---|
abstract byte |
code()
The unique code for the message type, used to differentiate all messages from each other. |
void |
fromStream(DataInput in)
Reads the internal state of the Streamable object from the input stream. |
Node |
getOrigin()
|
void |
toStream(DataOutput out)
Writes the internal state of the Streamable object to the output stream in a format that can later be read by the same Streamble class using the Streamable.fromStream(java.io.DataInput) method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OriginMessage(Node origin)
public OriginMessage(DataInput in)
throws IOException
IOException| Method Detail |
|---|
public void fromStream(DataInput in)
throws IOException
StreamableUnsupportedOperationException,
and instead implement a constructor as described above.
fromStream in interface StreamableIOException
public void toStream(DataOutput out)
throws IOException
StreamableStreamable.fromStream(java.io.DataInput) method.
toStream in interface StreamableIOExceptionpublic Node getOrigin()
public abstract byte code()
Messagebyte type there can
be at most 256 different message types.
code in interface Message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||