Class Rsp<T>

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

public class Rsp<T> extends Object
Class that represents a response from a communication
  • Field Details

    • RECEIVED

      protected static final byte RECEIVED
      Flag that represents whether the response was received
      See Also:
    • SUSPECTED

      protected static final byte SUSPECTED
      Flag that represents whether the sender of the response was suspected
      See Also:
    • 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:
    • IS_EXCEPTION

      protected static final byte IS_EXCEPTION
      Set when the value is an exception
      See Also:
    • flags

      protected byte flags
    • value

      protected Object value
      The value from the response (or the exception)
  • Constructor Details

    • Rsp

      public Rsp()
    • Rsp

      public Rsp(T retval)
    • Rsp

      public Rsp(Throwable t)
  • Method Details

    • readIn

      public void readIn(Rsp<T> other)
    • getValue

      public T getValue()
    • setValue

      public Rsp<T> setValue(T val)
    • hasException

      public boolean hasException()
    • getException

      public Throwable getException()
    • setException

      public Rsp<T> setException(Throwable t)
    • wasReceived

      public boolean wasReceived()
    • setReceived

      public Rsp<T> setReceived()
    • wasSuspected

      public boolean wasSuspected()
    • setSuspected

      public boolean setSuspected()
    • wasUnreachable

      public boolean wasUnreachable()
    • setUnreachable

      public boolean setUnreachable()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object