Class Rsp<T>


  • public class Rsp<T>
    extends java.lang.Object
    Class that represents a response from a communication
    • 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

      • readIn

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

        public T getValue()
      • setValue

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

        public boolean hasException()
      • getException

        public java.lang.Throwable getException()
      • setException

        public Rsp<T> setException​(java.lang.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 java.lang.Object
      • equals

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

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