Package net.i2p.data.i2cp
Class SessionStatusMessage
java.lang.Object
net.i2p.data.i2cp.I2CPMessageImpl
net.i2p.data.i2cp.SessionStatusMessage
- All Implemented Interfaces:
- I2CPMessage
public class SessionStatusMessage extends I2CPMessageImpl
Defines the message a router sends to a client indicating the
 status of the session.
- Author:
- jrandom
- 
Field SummaryFields Modifier and Type Field Description static intMESSAGE_TYPEstatic intSTATUS_CREATEDstatic intSTATUS_DESTROYEDstatic intSTATUS_DUP_DESTUsed internally, not in spec, will be remapped to STATUS_INVALID before being sent.static intSTATUS_INVALIDstatic intSTATUS_REFUSEDstatic intSTATUS_UPDATED
- 
Constructor SummaryConstructors Constructor Description SessionStatusMessage()
- 
Method SummaryModifier and Type Method Description protected voiddoReadMessage(InputStream in, int size)Read in the payload part of the message (after the initial 4 byte size and 1 byte type)protected byte[]doWriteMessage()Write out the payload part of the message (not including the 4 byte size and 1 byte type)SessionIdgetSessionId()intgetStatus()intgetType()Return the unique identifier for this type of message, as specified in the network specification document under #ClientAccessLayerMessagesSessionIdsessionId()Return the SessionId for this message.voidsetSessionId(SessionId id)voidsetStatus(int status)StringtoString()Methods inherited from class net.i2p.data.i2cp.I2CPMessageImplreadBytes, readMessage, readMessage, writeBytes, writeMessage
- 
Field Details- 
MESSAGE_TYPEpublic static final int MESSAGE_TYPE- See Also:
- Constant Field Values
 
- 
STATUS_DESTROYEDpublic static final int STATUS_DESTROYED- See Also:
- Constant Field Values
 
- 
STATUS_CREATEDpublic static final int STATUS_CREATED- See Also:
- Constant Field Values
 
- 
STATUS_UPDATEDpublic static final int STATUS_UPDATED- See Also:
- Constant Field Values
 
- 
STATUS_INVALIDpublic static final int STATUS_INVALID- See Also:
- Constant Field Values
 
- 
STATUS_REFUSEDpublic static final int STATUS_REFUSED- Since:
- 0.9.12
- See Also:
- Constant Field Values
 
- 
STATUS_DUP_DESTpublic static final int STATUS_DUP_DESTUsed internally, not in spec, will be remapped to STATUS_INVALID before being sent.- Since:
- 0.9.44
- See Also:
- Constant Field Values
 
 
- 
- 
Constructor Details- 
SessionStatusMessagepublic SessionStatusMessage()
 
- 
- 
Method Details- 
getSessionId
- 
sessionIdReturn the SessionId for this message.- Specified by:
- sessionIdin interface- I2CPMessage
- Overrides:
- sessionIdin class- I2CPMessageImpl
- Returns:
- null always. Extending classes with a SessionId must override.
- Since:
- 0.9.21
 
- 
setSessionId
- 
getStatuspublic int getStatus()
- 
setStatuspublic void setStatus(int status)
- 
doReadMessageDescription copied from class:I2CPMessageImplRead in the payload part of the message (after the initial 4 byte size and 1 byte type)- Specified by:
- doReadMessagein class- I2CPMessageImpl
- Parameters:
- in- InputStream
- size- payload size
- Throws:
- I2CPMessageException
- IOException
 
- 
doWriteMessageDescription copied from class:I2CPMessageImplWrite out the payload part of the message (not including the 4 byte size and 1 byte type)- Specified by:
- doWriteMessagein class- I2CPMessageImpl
- Returns:
- byte array
- Throws:
- I2CPMessageException
- IOException
 
- 
getTypepublic int getType()Description copied from interface:I2CPMessageReturn the unique identifier for this type of message, as specified in the network specification document under #ClientAccessLayerMessages- Returns:
- unique identifier for this type of message
 
- 
toString
 
-