|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RemoteObject
Provides access to various settings on a remote object.
ObjectSpace.getRemoteObject(com.esotericsoftware.kryonet.Connection, int, Class...)
Method Summary | |
---|---|
void |
close()
Causes this RemoteObject to stop listening to the connection for method invocation response messages. |
byte |
getLastResponseID()
Gets the ID of response for the last method invocation. |
void |
setNonBlocking(boolean nonBlocking,
boolean ignoreResponses)
Sets the blocking behavior when invoking a method that has a return value. |
void |
setResponseTimeout(int timeoutMillis)
Sets the milliseconds to wait for a method to return value. |
java.lang.Object |
waitForLastResponse()
Waits for the response to the last method invocation to be received or the response timeout to be reached. |
java.lang.Object |
waitForResponse(byte responseID)
Waits for the specified method invocation response to be received or the response timeout to be reached. |
Method Detail |
---|
void setResponseTimeout(int timeoutMillis)
void setNonBlocking(boolean nonBlocking, boolean ignoreResponses)
nonBlocking
- If false, the invoking thread will wait for a return value or timeout (default). If true, the invoking
thread will not wait for a response. The response can later be retrieved with waitForLastResponse()
or
waitForResponse(byte)
. The method will return immediately and the return value should be ignored.ignoreResponses
- If false, then the response for non-blocking method invocations can be retrieved with
waitForLastResponse()
or waitForResponse(byte)
. The responses will be stored until retrieved, so
each method call should have a matching retrieve. If true, then the response to non-blocking method invocations
will never be sent by the remote side of the connection and the response can never be retrieved.java.lang.Object waitForLastResponse()
ObjectSpace.getRemoteObject(com.esotericsoftware.kryonet.Connection, int, Class...)
byte getLastResponseID()
java.lang.Object waitForResponse(byte responseID)
ObjectSpace.getRemoteObject(com.esotericsoftware.kryonet.Connection, int, Class...)
void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |