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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSignal(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 booleanprotected booleanprotected booleanprotected abstract voidexecute(BufferInputStream in, BufferOutputStream out) protected voidprotected voidprotected final voidflush()protected Stringprotected final BufferInputStreamprotected final BufferOutputStreamorg.eclipse.net4j.util.container.IManagedContainerfinal intprotected InputStreamprotected OutputStreamfinal shortgetID()Returns the short integer ID of this signal that is unique among all signals of the associatedprotocol.getName()protected voidfinal voidrun()toString()toString(boolean shortForm) protected InputStreamprotected 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:
getContainerin 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
-