Package org.jgroups.util
Class Rsp<T>
- java.lang.Object
-
- org.jgroups.util.Rsp<T>
-
public class Rsp<T> extends java.lang.Object
Class that represents a response from a communication
-
-
Field Summary
Fields Modifier and Type Field Description protected byte
flags
protected static byte
IS_EXCEPTION
Set when the value is an exceptionprotected static byte
RECEIVED
Flag that represents whether the response was receivedprotected static byte
SUSPECTED
Flag that represents whether the sender of the response was suspectedprotected static byte
UNREACHABLE
If true, the sender (below) could not be reached, e.g.protected java.lang.Object
value
The value from the response (or the exception)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.Throwable
getException()
T
getValue()
boolean
hasException()
int
hashCode()
void
readIn(Rsp<T> other)
Rsp<T>
setException(java.lang.Throwable t)
Rsp<T>
setReceived()
boolean
setSuspected()
boolean
setUnreachable()
Rsp<T>
setValue(T val)
java.lang.String
toString()
boolean
wasReceived()
boolean
wasSuspected()
boolean
wasUnreachable()
-
-
-
Field Detail
-
RECEIVED
protected static final byte RECEIVED
Flag that represents whether the response was received- See Also:
- Constant Field Values
-
SUSPECTED
protected static final byte SUSPECTED
Flag that represents whether the sender of the response was suspected- See Also:
- Constant Field Values
-
UNREACHABLE
protected static final byte UNREACHABLE
If true, the sender (below) could not be reached, e.g. if a site was down (only used by RELAY2)- See Also:
- Constant Field Values
-
IS_EXCEPTION
protected static final byte IS_EXCEPTION
Set when the value is an exception- See Also:
- Constant Field Values
-
flags
protected byte flags
-
value
protected java.lang.Object value
The value from the response (or the exception)
-
-
Constructor Detail
-
Rsp
public Rsp()
-
Rsp
public Rsp(T retval)
-
Rsp
public Rsp(java.lang.Throwable t)
-
-
Method Detail
-
getValue
public T getValue()
-
hasException
public boolean hasException()
-
getException
public java.lang.Throwable getException()
-
wasReceived
public boolean wasReceived()
-
wasSuspected
public boolean wasSuspected()
-
setSuspected
public boolean setSuspected()
-
wasUnreachable
public boolean wasUnreachable()
-
setUnreachable
public boolean setUnreachable()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-