Interface Reply

  • All Superinterfaces:
    org.refcodes.exception.ExceptionAccessor<java.lang.Throwable>, org.refcodes.exception.ExceptionAccessor.ExceptionMutator<java.lang.Throwable>, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<java.lang.Throwable>, InstanceId, org.refcodes.mixin.InstanceIdAccessor, Session, SessionIdAccessor
    All Known Subinterfaces:
    CancelMethodReplyMessage, MethodReplyMessage, PublishSubjectReplyMessage


    public interface Reply
    extends Session, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<java.lang.Throwable>
    The Interface Reply.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.exception.ExceptionAccessor

        org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<E extends java.lang.Throwable,B extends org.refcodes.exception.ExceptionAccessor.ExceptionBuilder<E,B>>, org.refcodes.exception.ExceptionAccessor.ExceptionMutator<E extends java.lang.Object>, org.refcodes.exception.ExceptionAccessor.ExceptionProperty<E extends java.lang.Throwable>
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.InstanceIdAccessor

        org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B extends org.refcodes.mixin.InstanceIdAccessor.InstanceIdBuilder<B>>, org.refcodes.mixin.InstanceIdAccessor.InstanceIdMutator, org.refcodes.mixin.InstanceIdAccessor.InstanceIdProperty
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getReturnValue​()
      Returns the return value of a method call.
      boolean hasReply​()
      Returns true if this reply is not empty and waiting to be feeded with a reply.
      boolean isException​()
      Returns true if the reply carries an exception which occurred when executing the method call.
      boolean isReturnValue​()
      Returns true if the reply carries a valid return value.
      void setException​(java.lang.Throwable aException)
      void setReply​(Reply methodReply)
      Sets a reply.
      void setReturnValue​(java.lang.Object returnValue)
      Sets the return value.
      • Methods inherited from interface org.refcodes.exception.ExceptionAccessor

        getException
      • Methods inherited from interface org.refcodes.mixin.InstanceIdAccessor

        getInstanceId
    • Method Detail

      • getReturnValue

        java.lang.Object getReturnValue​()
        Returns the return value of a method call. To test first if the reply does not contain a Throwable object (exception occurred!) use the method isThrowable().
        Returns:
        The return value of the method call (if any),
      • isException

        boolean isException​()
        Returns true if the reply carries an exception which occurred when executing the method call.
        Returns:
        True if this object contains an exception (Throwable object) instead of a return value.
      • isReturnValue

        boolean isReturnValue​()
        Returns true if the reply carries a valid return value.
        Returns:
        True if this object contains valid return value.
      • setReturnValue

        void setReturnValue​(java.lang.Object returnValue)
        Sets the return value.
        Parameters:
        returnValue - Description is currently not available!
      • setReply

        void setReply​(Reply methodReply)
        Sets a reply. The results (getThrowable(), getReturnValue()) from the provided reply are taken and set inside this instance. If this instance did not contain a reply before, then the method hasReply will return true from after this method call.
        Parameters:
        methodReply - An object of type BlueprintMethodReply from which the replied values (throwable or return value) will be taken.
      • setException

        void setException​(java.lang.Throwable aException)
        Specified by:
        setException in interface org.refcodes.exception.ExceptionAccessor.ExceptionMutator<java.lang.Throwable>
      • hasReply

        boolean hasReply​()
        Returns true if this reply is not empty and waiting to be feeded with a reply. Important for an object waiting for a reply - when method setMethodReply() has been called, then thi method returns true, or if an instance has been created already containing a repy (not being empty).
        Returns:
        True if an instance of this interface (which did not contain a valid reply) has been feeded with a reply.