org.planx.xmlstore.routing.operation
Class DataMessage
java.lang.Object
org.planx.xmlstore.routing.operation.OriginMessage
org.planx.xmlstore.routing.operation.DataMessage
- All Implemented Interfaces:
- Message, Streamable
- Direct Known Subclasses:
- StoreMessage
public class DataMessage
- extends OriginMessage
key
protected Identifier key
value
protected TimestampedValue value
DataMessage
protected DataMessage()
DataMessage
public DataMessage(Node origin,
Identifier key,
TimestampedValue value)
DataMessage
public DataMessage(DataInput in)
throws IOException
- Throws:
IOException
fromStream
public void fromStream(DataInput in)
throws IOException
- Description copied from interface:
Streamable
- Reads the internal state of the Streamable object from the input stream.
Immutable objects should throw an
UnsupportedOperationException,
and instead implement a constructor as described above.
- Specified by:
fromStream in interface Streamable- Overrides:
fromStream in class OriginMessage
- Throws:
IOException
toStream
public void toStream(DataOutput out)
throws IOException
- Description copied from interface:
Streamable
- 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.
- Specified by:
toStream in interface Streamable- Overrides:
toStream in class OriginMessage
- Throws:
IOException
getKey
public Identifier getKey()
getValue
public TimestampedValue getValue()
code
public byte code()
- Description copied from interface:
Message
- The unique code for the message type, used to differentiate all messages
from each other. Since this is of
byte type there can
be at most 256 different message types.
- Specified by:
code in interface Message- Specified by:
code in class OriginMessage
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010. All Rights Reserved.