java.lang.Object
net.i2p.data.i2cp.I2CPMessageImpl
net.i2p.internal.PoisonI2CPMessage
- All Implemented Interfaces:
I2CPMessage
For marking end-of-queues in a standard manner. Don't actually send it.
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intI2CP type number reserved for the never-to-be-sent poison marker.Constructor Summary
ConstructorsMethod Summary
All MethodsMethods inherited from class I2CPMessageImpl
doReadMessage, doWriteMessage, readBytes, readMessage, readMessage, sessionId, writeBytes, writeMessageModifier and TypeMethodDescriptionprotected abstract voiddoReadMessage(InputStream buf, int size) Read in the payload part of the message (after the initial 4 byte size and 1 byte type).protected abstract byte[]Write out the payload part of the message (not including the 4 byte size and 1 byte type).voidreadBytes(InputStream in) Read the message from the stream, wrapping I2CPMessageException inDataFormatException.voidValidate the type and size of the message, and then read the message into the data structures.voidreadMessage(InputStream in, int length, int type) Read the body into the data structures.Return the SessionId for this type of message.voidwriteBytes(OutputStream out) Write the message to the stream, wrapping I2CPMessageException in DataFormatException.voidwriteMessage(OutputStream out) Write out the full message to the stream, including the 4 byte size and 1 byte type header.
Field Details
MESSAGE_TYPE
public static final int MESSAGE_TYPEI2CP type number reserved for the never-to-be-sent poison marker.- See Also:
Constructor Details
PoisonI2CPMessage
public PoisonI2CPMessage()Creates the marker used to terminate a queue.
Method Details
getType
public int getType()Type of this message.- Returns:
- the PoisonI2CPMessage type
hashCode
equals
toString