org.eclipse.net4j.signal

## Class IndicationWithResponse

- java.lang.Object
- - org.eclipse.net4j.signal.Signal
  - - org.eclipse.net4j.signal.SignalReactor
    - - org.eclipse.net4j.signal.IndicationWithResponse

- All Implemented Interfaces:
    Runnable
  Direct Known Subclasses:
    IndicationWithMonitoring

      public abstract class IndicationWithResponse
      extends SignalReactor

  Represents the receiver 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
    `IndicationWithResponse(SignalProtocol<?> protocol, Enum<?> literal)`
    `IndicationWithResponse(SignalProtocol<?> protocol, short signalID)`
    `IndicationWithResponse(SignalProtocol<?> protocol, short id, String name)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `closeChannelAfterException()`
    `protected void` | `execute(BufferInputStream in, BufferOutputStream out)`
    `protected String` | `getExceptionMessage(Throwable t)`
    `protected abstract void` | `indicating(ExtendedDataInputStream in)`
    `protected abstract void` | `responding(ExtendedDataOutputStream out)` Important Note: The response must not be empty, i.e.

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

    - #### IndicationWithResponse

          public IndicationWithResponse(SignalProtocol<?> protocol,
                                        short id,
                                        String name)

      Since:
        2.0

    - #### IndicationWithResponse

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

      Since:
        2.0

    - #### IndicationWithResponse

          public IndicationWithResponse(SignalProtocol<?> protocol,
                                        Enum<?> literal)

      Since:
        2.0

  - ### Method Detail

    - #### closeChannelAfterException

          protected boolean closeChannelAfterException()

      Since:
        4.4

    - #### getExceptionMessage

          protected String getExceptionMessage(Throwable t)

      Since:
        2.0

    - #### execute

          protected void execute(BufferInputStream in,
                                 BufferOutputStream out)
                          throws Exception

      Specified by:
        `execute` in class `Signal`
      Throws:
        `Exception`

    - #### indicating

          protected abstract void indicating(ExtendedDataInputStream in)
                                      throws Exception

      Throws:
        `Exception`

    - #### responding

          protected abstract void responding(ExtendedDataOutputStream out)
                                      throws Exception

      Important Note: The response must not be empty, i.e. the stream must be used at least to write a `boolean`. Otherwise synchronization problems will result!
      Throws:
        `Exception`

Copyright (c) 2014 Eike Stepper (Berlin, 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