net.i2p.sam.client
public class SAMEventHandler extends SAMClientEventListenerImpl
NAMING_REPLY_INVALID_KEY, NAMING_REPLY_KEY_NOT_FOUND, NAMING_REPLY_OK, SESSION_STATUS_DUPLICATE_DEST, SESSION_STATUS_I2P_ERROR, SESSION_STATUS_INVALID_KEY, SESSION_STATUS_OK, STREAM_CLOSED_CANT_REACH_PEER, STREAM_CLOSED_I2P_ERROR, STREAM_CLOSED_OK, STREAM_CLOSED_PEER_NOT_FOUND, STREAM_CLOSED_TIMEOUT, STREAM_STATUS_CANT_REACH_PEER, STREAM_STATUS_I2P_ERROR, STREAM_STATUS_INVALID_KEY, STREAM_STATUS_OK, STREAM_STATUS_TIMEOUT
Constructor and Description |
---|
SAMEventHandler(I2PAppContext ctx) |
Modifier and Type | Method and Description |
---|---|
void |
helloReplyReceived(boolean ok) |
void |
namingReplyReceived(String name,
String result,
String value,
String msg) |
void |
sessionStatusReceived(String result,
String destination,
String msg) |
void |
unknownMessageReceived(String major,
String minor,
Properties params) |
boolean |
waitForHelloReply()
Wait for the connection to be established, returning true if everything
went ok
|
String |
waitForNamingReply(String name)
Return the destination found matching the name, or null if the key was
not able to be retrieved.
|
boolean |
waitForSessionCreateReply()
Wait for the session to be created, returning true if everything went ok
|
destReplyReceived, streamClosedReceived, streamConnectedReceived, streamDataReceived, streamStatusReceived
public SAMEventHandler(I2PAppContext ctx)
public void helloReplyReceived(boolean ok)
helloReplyReceived
in interface SAMReader.SAMClientEventListener
helloReplyReceived
in class SAMClientEventListenerImpl
public void sessionStatusReceived(String result, String destination, String msg)
sessionStatusReceived
in interface SAMReader.SAMClientEventListener
sessionStatusReceived
in class SAMClientEventListenerImpl
public void namingReplyReceived(String name, String result, String value, String msg)
namingReplyReceived
in interface SAMReader.SAMClientEventListener
namingReplyReceived
in class SAMClientEventListenerImpl
public void unknownMessageReceived(String major, String minor, Properties params)
unknownMessageReceived
in interface SAMReader.SAMClientEventListener
unknownMessageReceived
in class SAMClientEventListenerImpl
public boolean waitForHelloReply()
public boolean waitForSessionCreateReply()