Class RequestWithConfirmation<RESULT>

  • All Implemented Interfaces:
    java.lang.Runnable
    Direct Known Subclasses:
    RequestWithMonitoring

    public abstract class RequestWithConfirmation<RESULT>
    extends SignalActor
    Represents the sender side of a two-way signal, i.e., one with a response.
    Author:
    Eike Stepper
    • Constructor Detail

      • RequestWithConfirmation

        public RequestWithConfirmation​(SignalProtocol<?> protocol,
                                       short id,
                                       java.lang.String name)
        Since:
        2.0
      • RequestWithConfirmation

        public RequestWithConfirmation​(SignalProtocol<?> protocol,
                                       short signalID)
        Since:
        2.0
      • RequestWithConfirmation

        public RequestWithConfirmation​(SignalProtocol<?> protocol,
                                       java.lang.Enum<?> literal)
        Since:
        2.0
    • Method Detail

      • sendAsync

        public java.util.concurrent.Future<RESULT> sendAsync()
        Since:
        2.0
      • getAsyncExecutorService

        protected java.util.concurrent.ExecutorService getAsyncExecutorService()
        Since:
        2.0
      • requesting

        protected abstract void requesting​(org.eclipse.net4j.util.io.ExtendedDataOutputStream out)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • confirming

        protected abstract RESULT confirming​(org.eclipse.net4j.util.io.ExtendedDataInputStream in)
                                      throws java.lang.Exception
        Important Note: The confirmation must not be empty, i.e. the stream must be used at least to read a boolean. Otherwise synchronization problems will result!
        Throws:
        java.lang.Exception