|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.data.DataStructureImpl
net.i2p.data.i2cp.I2CPMessageImpl
net.i2p.data.i2cp.HostReplyMessage
public class HostReplyMessage
Response to HostLookupMessage. Replaces DestReplyMessage.
Field Summary | |
---|---|
static int |
MESSAGE_TYPE
|
static int |
RESULT_FAILURE
generic fail, other codes TBD |
static int |
RESULT_SUCCESS
|
Constructor Summary | |
---|---|
HostReplyMessage()
|
|
HostReplyMessage(SessionId id,
Destination d,
long reqID)
A message with RESULT_SUCCESS and a non-null Destination. |
|
HostReplyMessage(SessionId id,
int failureCode,
long reqID)
A message with a failure code and no Destination. |
Method Summary | |
---|---|
protected void |
doReadMessage(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) |
Destination |
getDestination()
|
long |
getReqID()
|
int |
getResultCode()
|
SessionId |
getSessionId()
|
int |
getType()
Return the unique identifier for this type of message, as specified in the network specification document under #ClientAccessLayerMessages |
SessionId |
sessionId()
Return the SessionId for this message. |
String |
toString()
|
Methods inherited from class net.i2p.data.i2cp.I2CPMessageImpl |
---|
readBytes, readMessage, readMessage, writeBytes, writeMessage |
Methods inherited from class net.i2p.data.DataStructureImpl |
---|
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.i2p.data.DataStructure |
---|
calculateHash, fromBase64, fromByteArray, toBase64, toByteArray |
Field Detail |
---|
public static final int MESSAGE_TYPE
public static final int RESULT_SUCCESS
public static final int RESULT_FAILURE
Constructor Detail |
---|
public HostReplyMessage()
public HostReplyMessage(SessionId id, Destination d, long reqID)
d
- non-nullreqID
- 0 to 2**32 - 1public HostReplyMessage(SessionId id, int failureCode, long reqID)
failureCode
- 1-255reqID
- from the HostLookup 0 to 2**32 - 1Method Detail |
---|
public SessionId getSessionId()
public SessionId sessionId()
sessionId
in interface I2CPMessage
sessionId
in class I2CPMessageImpl
public long getReqID()
public int getResultCode()
public Destination getDestination()
protected void doReadMessage(InputStream in, int size) throws I2CPMessageException, IOException
I2CPMessageImpl
doReadMessage
in class I2CPMessageImpl
in
- InputStreamsize
- payload size
I2CPMessageException
IOException
protected byte[] doWriteMessage() throws I2CPMessageException, IOException
I2CPMessageImpl
doWriteMessage
in class I2CPMessageImpl
I2CPMessageException
IOException
public int getType()
I2CPMessage
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |