Class Signal

java.lang.Object
org.eclipse.net4j.signal.Signal
All Implemented Interfaces:
Runnable, org.eclipse.net4j.util.container.IManagedContainerProvider
Direct Known Subclasses:
SignalActor, SignalReactor

public abstract class Signal extends Object implements Runnable, org.eclipse.net4j.util.container.IManagedContainerProvider
Represents a single communications use-case in the scope of a signal protocol.
Author:
Eike Stepper
  • Field Details

  • Constructor Details

  • Method Details

    • getProtocol

      public SignalProtocol<?> getProtocol()
    • getID

      public final short getID()
      Returns the short integer ID of this signal that is unique among all signals of the associated protocol.
      Since:
      2.0
    • getName

      public String getName()
      Since:
      2.0
    • getCorrelationID

      public final int getCorrelationID()
      Since:
      2.0
    • getContainer

      public org.eclipse.net4j.util.container.IManagedContainer getContainer()
      Specified by:
      getContainer in interface org.eclipse.net4j.util.container.IManagedContainerProvider
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Since:
      2.0
    • toString

      public String toString(boolean shortForm)
      Since:
      4.13
    • getAdditionalInfo

      protected String getAdditionalInfo()
      Since:
      4.5
    • run

      public final void run()
      Specified by:
      run in interface Runnable
    • getBufferInputStream

      protected final BufferInputStream getBufferInputStream()
    • getBufferOutputStream

      protected final BufferOutputStream getBufferOutputStream()
    • flush

      protected final void flush() throws IOException
      Throws:
      IOException
      Since:
      2.0
    • closeChannelAfterMe

      protected boolean closeChannelAfterMe()
      Since:
      4.4
    • closeInputStreamAfterMe

      protected boolean closeInputStreamAfterMe()
      Since:
      4.5
    • closeOutputStreamAfterMe

      protected boolean closeOutputStreamAfterMe()
      Since:
      4.5
    • getCurrentInputStream

      protected InputStream getCurrentInputStream()
      Since:
      2.0
    • getCurrentOutputStream

      protected OutputStream getCurrentOutputStream()
      Since:
      2.0
    • wrapInputStream

      protected InputStream wrapInputStream(InputStream in) throws IOException
      Throws:
      IOException
    • wrapOutputStream

      protected OutputStream wrapOutputStream(OutputStream out) throws IOException
      Throws:
      IOException
    • finishInputStream

      protected void finishInputStream(InputStream in) throws IOException
      Throws:
      IOException
    • finishOutputStream

      protected void finishOutputStream(OutputStream out) throws IOException
      Throws:
      IOException
    • handleRunException

      protected void handleRunException(Throwable ex) throws Throwable
      Throws:
      Throwable
      Since:
      4.19
    • execute

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