|
Voyager ORB | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectspace.voyager.message.Result
A Result represents the result of a Sync or Future message. A Result may be polled using isAvailable(), read in a blocking fashion using the readXXX() family of methods, or listened to using addResultListener(). If the reply is not received within the specified timeout period, the result is set to a TimeoutException. The final values of any holder arguments are accessible via the getArgs() method.
Method Summary | |
void |
addResultListener(ResultListener listener)
Add the specified listener to my set of result listeners. |
java.lang.Object[] |
getArgs()
Return the arguments. |
java.lang.Exception |
getException()
Wait for the reply and then return the exception or null if the method succeeded. |
long |
getTimeout()
Return my timeout value in milliseconds. |
boolean |
isAvailable()
Return true if the reply has arrived. |
boolean |
isException()
Wait for the reply and then return true if it is an exception. |
boolean |
readBoolean()
Wait for the reply and then return the result as a boolean or rethrow an exception if one occurred. |
byte |
readByte()
Wait for the reply and then return the result as a byte or rethrow an exception if one occurred. |
char |
readChar()
Wait for the reply and then return the result as a char or rethrow an exception if one occurred. |
double |
readDouble()
Wait for the reply and then return the result as a double or rethrow an exception if one occurred. |
float |
readFloat()
Wait for the reply and then return the result as a float or rethrow an exception if one occurred. |
int |
readInt()
Wait for the reply and then return the result as an int or rethrow an exception if one occurred. |
long |
readLong()
Wait for the reply and then return the result as a long or rethrow an exception if one occurred. |
java.lang.Object |
readObject()
Wait for the reply and then return the result as an object or rethrow an exception if one occurred. |
short |
readShort()
Wait for the reply and then return the result as a short or rethrow an exception if one occurred. |
void |
removeResultListener(ResultListener listener)
Remove the specified listener from my set of result listeners. |
java.lang.String |
toString()
Return a string that describes me. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Method Detail |
public java.lang.String toString()
public java.lang.Object readObject() throws java.lang.Exception
public int readInt() throws java.lang.Exception
public byte readByte() throws java.lang.Exception
public char readChar() throws java.lang.Exception
public boolean readBoolean() throws java.lang.Exception
public float readFloat() throws java.lang.Exception
public double readDouble() throws java.lang.Exception
public long readLong() throws java.lang.Exception
public short readShort() throws java.lang.Exception
public java.lang.Object[] getArgs()
public boolean isAvailable()
public boolean isException() throws TimeoutException
public java.lang.Exception getException() throws TimeoutException
public void addResultListener(ResultListener listener)
listener
- The listener to add.public void removeResultListener(ResultListener listener)
listener
- The listener to remove.public long getTimeout()
|
ObjectSpace Inc. | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |