org.jgroups.util
Class Rsp<T>

java.lang.Object
  extended by org.jgroups.util.Rsp<T>

public class Rsp<T>
extends java.lang.Object

Class that represents a response from a communication


Field Summary
protected  java.lang.Throwable exception
          If there was an exception, this field will contain it
protected  boolean received
          Flag that represents whether the response was received
protected  T retval
          The value from the response
protected  Address sender
          The sender of this response
protected  boolean suspected
          Flag that represents whether the sender of the response was suspected
protected  boolean unreachable
          If true, the sender (below) could not be reached, e.g.
 
Constructor Summary
Rsp(Address sender)
           
Rsp(Address sender, T retval)
           
Rsp(Address sender, java.lang.Throwable t)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Throwable getException()
           
 Address getSender()
           
 T getValue()
           
 boolean hasException()
           
 int hashCode()
           
 void setException(java.lang.Throwable t)
           
 void setReceived()
           
 boolean setSuspected()
           
 boolean setUnreachable()
           
 void setValue(T val)
           
 java.lang.String toString()
           
 boolean wasReceived()
           
 boolean wasSuspected()
           
 boolean wasUnreachable()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

received

protected boolean received
Flag that represents whether the response was received


suspected

protected boolean suspected
Flag that represents whether the sender of the response was suspected


unreachable

protected boolean unreachable
If true, the sender (below) could not be reached, e.g. if a site was down (only used by RELAY2)


sender

protected final Address sender
The sender of this response


retval

protected T retval
The value from the response


exception

protected java.lang.Throwable exception
If there was an exception, this field will contain it

Constructor Detail

Rsp

public Rsp(Address sender)

Rsp

public Rsp(Address sender,
           T retval)

Rsp

public Rsp(Address sender,
           java.lang.Throwable t)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getValue

public T getValue()

setValue

public void setValue(T val)

hasException

public boolean hasException()

getException

public java.lang.Throwable getException()

setException

public void setException(java.lang.Throwable t)

getSender

public Address getSender()

wasReceived

public boolean wasReceived()

setReceived

public void setReceived()

wasSuspected

public boolean wasSuspected()

setSuspected

public boolean setSuspected()

wasUnreachable

public boolean wasUnreachable()

setUnreachable

public boolean setUnreachable()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.