org.eclipse.net4j.signal

## Class RequestWithMonitoring<RESULT>

- java.lang.Object
- - org.eclipse.net4j.signal.Signal
  - - org.eclipse.net4j.signal.SignalActor
    - - org.eclipse.net4j.signal.RequestWithConfirmation<RESULT>
      - - org.eclipse.net4j.signal.RequestWithMonitoring<RESULT>

- All Implemented Interfaces:
    java.lang.Runnable
  Direct Known Subclasses:
    AuthenticationRequest, ConfirmationRequest

      public abstract class RequestWithMonitoring<RESULT>
      extends RequestWithConfirmation<RESULT>

  Represents the sender side of a two-way `signal` with additional support for remote progress monitoring.
  Since:
    2.0
  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DEFAULT_CANCELATION_POLL_INTERVAL`
    `static int` | `DEFAULT_MONITOR_PROGRESS_SECONDS`
    `static int` | `DEFAULT_MONITOR_TIMEOUT_SECONDS`

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

      `NO_TIMEOUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestWithMonitoring(SignalProtocol<?> protocol, java.lang.Enum<?> literal)`
    `RequestWithMonitoring(SignalProtocol<?> protocol, short signalID)`
    `RequestWithMonitoring(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 RESULT` | `confirming(ExtendedDataInputStream in)` Important Note: The confirmation must not be empty, i.e.
    `protected abstract RESULT` | `confirming(ExtendedDataInputStream in, OMMonitor monitor)` Important Note: The confirmation must not be empty, i.e.
    `protected java.util.concurrent.ExecutorService` | `getCancelationExecutorService()`
    `protected long` | `getCancelationPollInterval()`
    `protected int` | `getConfirmingWorkPercent()`
    `protected int` | `getMonitorProgressSeconds()`
    `protected int` | `getMonitorTimeoutSeconds()`
    `protected int` | `getRequestingWorkPercent()`
    `protected void` | `requesting(ExtendedDataOutputStream out)`
    `protected abstract void` | `requesting(ExtendedDataOutputStream out, OMMonitor monitor)`
    `RESULT` | `send()`
    `RESULT` | `send(long timeout)`
    `RESULT` | `send(long timeout, OMMonitor monitor)`
    `RESULT` | `send(OMMonitor monitor)`
    `java.util.concurrent.Future<RESULT>` | `sendAsync()`
    `java.util.concurrent.Future<RESULT>` | `sendAsync(OMMonitor monitor)`

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

      `getAsyncExecutorService`

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

- - ### Field Detail

    - #### DEFAULT_CANCELATION_POLL_INTERVAL

          public static final long DEFAULT_CANCELATION_POLL_INTERVAL

      Since:
        2.0
      See Also:
        Constant Field Values

    - #### DEFAULT_MONITOR_PROGRESS_SECONDS

          public static final int DEFAULT_MONITOR_PROGRESS_SECONDS

      Since:
        2.0
      See Also:
        Constant Field Values

    - #### DEFAULT_MONITOR_TIMEOUT_SECONDS

          public static final int DEFAULT_MONITOR_TIMEOUT_SECONDS

      Since:
        2.0
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RequestWithMonitoring

          public RequestWithMonitoring(SignalProtocol<?> protocol,
                                       short id,
                                       java.lang.String name)

      Since:
        2.0

    - #### RequestWithMonitoring

          public RequestWithMonitoring(SignalProtocol<?> protocol,
                                       short signalID)

      Since:
        2.0

    - #### RequestWithMonitoring

          public RequestWithMonitoring(SignalProtocol<?> protocol,
                                       java.lang.Enum<?> literal)

      Since:
        2.0

  - ### Method Detail

    - #### sendAsync

          public java.util.concurrent.Future<RESULT> sendAsync()

      Overrides:
        `sendAsync` in class `RequestWithConfirmation<RESULT>`

    - #### sendAsync

          public java.util.concurrent.Future<RESULT> sendAsync(OMMonitor monitor)

    - #### send

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

      Overrides:
        `send` in class `RequestWithConfirmation<RESULT>`
      Throws:
        `java.lang.Exception`
        `RemoteException`

    - #### send

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

      Overrides:
        `send` in class `RequestWithConfirmation<RESULT>`
      Throws:
        `java.lang.Exception`
        `RemoteException`

    - #### send

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

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

    - #### send

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

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

    - #### requesting

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

      Specified by:
        `requesting` in class `RequestWithConfirmation<RESULT>`
      Throws:
        `java.lang.Exception`

    - #### confirming

          protected final RESULT confirming(ExtendedDataInputStream in)
                                     throws java.lang.Exception

      Description copied from class: `RequestWithConfirmation`
      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!
      Specified by:
        `confirming` in class `RequestWithConfirmation<RESULT>`
      Throws:
        `java.lang.Exception`

    - #### requesting

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

      Throws:
        `java.lang.Exception`

    - #### confirming

          protected abstract RESULT confirming(ExtendedDataInputStream in,
                                               OMMonitor monitor)
                                        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`

    - #### getCancelationExecutorService

          protected java.util.concurrent.ExecutorService getCancelationExecutorService()

      Since:
        2.0

    - #### getCancelationPollInterval

          protected long getCancelationPollInterval()

      Since:
        2.0

    - #### getMonitorProgressSeconds

          protected int getMonitorProgressSeconds()

      Since:
        2.0

    - #### getMonitorTimeoutSeconds

          protected int getMonitorTimeoutSeconds()

      Since:
        2.0

    - #### getRequestingWorkPercent

          protected int getRequestingWorkPercent()

      Since:
        2.0

    - #### getConfirmingWorkPercent

          protected int getConfirmingWorkPercent()

      Since:
        2.0

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