org.eclipse.net4j.signal

## Class RequestWithConfirmation<RESULT>

- java.lang.Object
- - org.eclipse.net4j.signal.Signal
  - - org.eclipse.net4j.signal.SignalActor
    - - org.eclipse.net4j.signal.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

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.signal.Signal

      `NO_TIMEOUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestWithConfirmation(SignalProtocol<?> protocol, java.lang.Enum<?> literal)`
    `RequestWithConfirmation(SignalProtocol<?> protocol, short signalID)`
    `RequestWithConfirmation(SignalProtocol<?> protocol, short id, java.lang.String name)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract RESULT` | `confirming(ExtendedDataInputStream in)` Important Note: The confirmation must not be empty, i.e.
    `protected java.util.concurrent.ExecutorService` | `getAsyncExecutorService()`
    `protected abstract void` | `requesting(ExtendedDataOutputStream out)`
    `RESULT` | `send()`
    `RESULT` | `send(long timeout)`
    `java.util.concurrent.Future<RESULT>` | `sendAsync()`

    - ### Methods inherited from class org.eclipse.net4j.signal.SignalActor

      `execute`

    - ### Methods inherited from class org.eclipse.net4j.signal.Signal

      `closeChannelAfterMe, closeInputStreamAfterMe, closeOutputStreamAfterMe, finishInputStream, finishOutputStream, flush, getAdditionalInfo, getBufferInputStream, getBufferOutputStream, getCorrelationID, getCurrentInputStream, getCurrentOutputStream, getID, getName, getProtocol, run, toString, wrapInputStream, wrapOutputStream`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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

    - #### send

          public RESULT send()
                      throws java.lang.Exception,
                             RemoteException

      Throws:
        `java.lang.Exception`
        `RemoteException`
      Since:
        2.0

    - #### send

          public RESULT send(long timeout)
                      throws java.lang.Exception,
                             RemoteException

      Throws:
        `java.lang.Exception`
        `RemoteException`
      Since:
        2.0

    - #### getAsyncExecutorService

          protected java.util.concurrent.ExecutorService getAsyncExecutorService()

      Since:
        2.0

    - #### requesting

          protected abstract void requesting(ExtendedDataOutputStream out)
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### confirming

          protected abstract RESULT confirming(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`

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html