|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.networking.NetworkReplyObject
public class NetworkReplyObject
Class for storing a network response. If the response has not
been set when getResponse()
have been called, this method
will block until setResponse(java.lang.Object)
has been called.
Constructor Summary | |
---|---|
NetworkReplyObject(int networkReplyId,
boolean streamed)
The constructor. |
Method Summary | |
---|---|
int |
getNetworkReplyId()
Gets the unique identifier for the network message this object will store. |
java.lang.Object |
getResponse()
Gets the response. |
void |
interrupt()
Interrupts any thread waiting for a response. |
boolean |
isStreamed()
Checks if this NetworkReplyObject
expects streamed data. |
void |
setResponse(java.lang.Object response)
Sets the response and continues getResponse() . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetworkReplyObject(int networkReplyId, boolean streamed)
networkReplyId
- The unique identifier for the network message
this object will store.streamed
- Should be set to true
if the
incoming data should be handled as stream data.Method Detail |
---|
public boolean isStreamed()
NetworkReplyObject
expects streamed data.
true
if the incoming data
should be handled as a stream.public void setResponse(java.lang.Object response)
getResponse()
.
response
- The response.getResponse()
public int getNetworkReplyId()
public java.lang.Object getResponse()
setResponse(java.lang.Object)
has been called.
public void interrupt()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |