Package org.eclipse.net4j.signal
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 Summary
-
Constructor Summary
ConstructorDescriptionSignal
(SignalProtocol<?> protocol, short id) Signal
(SignalProtocol<?> protocol, short id, String name) Both implementation classes of a logical signal must have the same signalID.Signal
(SignalProtocol<?> protocol, Enum<?> literal) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected boolean
protected boolean
protected abstract void
execute
(BufferInputStream in, BufferOutputStream out) protected void
protected void
protected final void
flush()
protected String
protected final BufferInputStream
protected final BufferOutputStream
org.eclipse.net4j.util.container.IManagedContainer
final int
protected InputStream
protected OutputStream
final short
getID()
Returns the short integer ID of this signal that is unique among all signals of the associatedprotocol
.getName()
protected void
final void
run()
toString()
toString
(boolean shortForm) protected InputStream
protected OutputStream
-
Field Details
-
NO_TIMEOUT
public static final long NO_TIMEOUT- Since:
- 2.0
- See Also:
-
-
Constructor Details
-
Signal
Both implementation classes of a logical signal must have the same signalID. The signalID of a user signals must be equal to or greater than zero.- Since:
- 2.0
-
Signal
- Since:
- 2.0
- See Also:
-
Signal
- Since:
- 2.0
- See Also:
-
-
Method Details
-
getProtocol
-
getID
public final short getID()Returns the short integer ID of this signal that is unique among all signals of the associatedprotocol
.- Since:
- 2.0
-
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 interfaceorg.eclipse.net4j.util.container.IManagedContainerProvider
-
toString
-
toString
- Since:
- 4.13
-
getAdditionalInfo
- Since:
- 4.5
-
run
public final void run() -
getBufferInputStream
-
getBufferOutputStream
-
flush
- 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
- Since:
- 2.0
-
getCurrentOutputStream
- Since:
- 2.0
-
wrapInputStream
- Throws:
IOException
-
wrapOutputStream
- Throws:
IOException
-
finishInputStream
- Throws:
IOException
-
finishOutputStream
- Throws:
IOException
-
handleRunException
- Throws:
Throwable
- Since:
- 4.19
-
execute
- Throws:
Exception
-