SAMReader.SAMClientEventListenerpublic 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 | Description |
|---|---|
SAMEventHandler(I2PAppContext ctx) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
helloReplyReceived(boolean ok,
String version) |
|
void |
namingReplyReceived(String name,
String result,
String value,
String msg) |
|
void |
sessionStatusReceived(String result,
String destination,
String msg) |
may be called twice, first for CREATE and second for ADD
|
void |
streamStatusReceived(String result,
String id,
String message) |
|
void |
unknownMessageReceived(String major,
String minor,
Properties params) |
|
String |
waitForHelloReply() |
Wait for the connection to be established, returning the server version 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 |
waitForSessionAddReply() |
Wait for the session to be added, returning true if everything went ok
|
boolean |
waitForSessionCreateReply() |
Wait for the session to be created, returning true if everything went ok
|
boolean |
waitForStreamStatusReply() |
Wait for the stream to be created, returning true if everything went ok
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdatagramReceived, destReplyReceived, pingReceived, pongReceived, rawReceived, streamClosedReceived, streamConnectedReceived, streamDataReceivedpublic SAMEventHandler(I2PAppContext ctx)
public void helloReplyReceived(boolean ok,
String version)
helloReplyReceived in interface SAMReader.SAMClientEventListenerhelloReplyReceived in class SAMClientEventListenerImplpublic void sessionStatusReceived(String result, String destination, String msg)
sessionStatusReceived in interface SAMReader.SAMClientEventListenersessionStatusReceived in class SAMClientEventListenerImplpublic void namingReplyReceived(String name, String result, String value, String msg)
namingReplyReceived in interface SAMReader.SAMClientEventListenernamingReplyReceived in class SAMClientEventListenerImplpublic void streamStatusReceived(String result, String id, String message)
streamStatusReceived in interface SAMReader.SAMClientEventListenerstreamStatusReceived in class SAMClientEventListenerImplpublic void unknownMessageReceived(String major, String minor, Properties params)
unknownMessageReceived in interface SAMReader.SAMClientEventListenerunknownMessageReceived in class SAMClientEventListenerImplpublic String waitForHelloReply()
public boolean waitForSessionCreateReply()
public boolean waitForSessionAddReply()
public boolean waitForStreamStatusReply()