Package org.eclipse.net4j.signal
Class Signal
- java.lang.Object
- 
- org.eclipse.net4j.signal.Signal
 
- 
- All Implemented Interfaces:
- java.lang.Runnable
 - Direct Known Subclasses:
- SignalActor,- SignalReactor
 
 public abstract class Signal extends java.lang.Object implements java.lang.RunnableRepresents a single communications use-case in the scope of asignal protocol.- Author:
- Eike Stepper
 
- 
- 
Field SummaryFields Modifier and Type Field Description static longNO_TIMEOUT
 - 
Constructor SummaryConstructors Constructor Description Signal(SignalProtocol<?> protocol, short id)Signal(SignalProtocol<?> protocol, short id, java.lang.String name)Both implementation classes of a logical signal must have the same signalID.Signal(SignalProtocol<?> protocol, java.lang.Enum<?> literal)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancloseChannelAfterMe()protected booleancloseInputStreamAfterMe()protected booleancloseOutputStreamAfterMe()protected abstract voidexecute(BufferInputStream in, BufferOutputStream out)protected voidfinishInputStream(java.io.InputStream in)protected voidfinishOutputStream(java.io.OutputStream out)protected voidflush()protected java.lang.StringgetAdditionalInfo()protected BufferInputStreamgetBufferInputStream()protected BufferOutputStreamgetBufferOutputStream()intgetCorrelationID()protected java.io.InputStreamgetCurrentInputStream()protected java.io.OutputStreamgetCurrentOutputStream()shortgetID()Returns the short integer ID of this signal that is unique among all signals of the associatedprotocol.java.lang.StringgetName()SignalProtocol<?>getProtocol()voidrun()java.lang.StringtoString()java.lang.StringtoString(boolean shortForm)protected java.io.InputStreamwrapInputStream(java.io.InputStream in)protected java.io.OutputStreamwrapOutputStream(java.io.OutputStream out)
 
- 
- 
- 
Field Detail- 
NO_TIMEOUTpublic static final long NO_TIMEOUT - Since:
- 2.0
- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Signalpublic Signal(SignalProtocol<?> protocol, short id, java.lang.String name) 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
 
 - 
Signalpublic Signal(SignalProtocol<?> protocol, short id) - Since:
- 2.0
- See Also:
- Signal(SignalProtocol, short, String)
 
 - 
Signalpublic Signal(SignalProtocol<?> protocol, java.lang.Enum<?> literal) - Since:
- 2.0
- See Also:
- Signal(SignalProtocol, short, String)
 
 
- 
 - 
Method Detail- 
getProtocolpublic SignalProtocol<?> getProtocol() 
 - 
getIDpublic final short getID() Returns the short integer ID of this signal that is unique among all signals of the associatedprotocol.- Since:
- 2.0
 
 - 
getNamepublic java.lang.String getName() - Since:
- 2.0
 
 - 
getCorrelationIDpublic final int getCorrelationID() - Since:
- 2.0
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
- Since:
- 2.0
 
 - 
toStringpublic java.lang.String toString(boolean shortForm) - Since:
- 4.13
 
 - 
getAdditionalInfoprotected java.lang.String getAdditionalInfo() - Since:
- 4.5
 
 - 
runpublic final void run() - Specified by:
- runin interface- java.lang.Runnable
 
 - 
getBufferInputStreamprotected final BufferInputStream getBufferInputStream() 
 - 
getBufferOutputStreamprotected final BufferOutputStream getBufferOutputStream() 
 - 
flushprotected final void flush() throws java.io.IOException- Throws:
- java.io.IOException
- Since:
- 2.0
 
 - 
closeChannelAfterMeprotected boolean closeChannelAfterMe() - Since:
- 4.4
 
 - 
closeInputStreamAfterMeprotected boolean closeInputStreamAfterMe() - Since:
- 4.5
 
 - 
closeOutputStreamAfterMeprotected boolean closeOutputStreamAfterMe() - Since:
- 4.5
 
 - 
getCurrentInputStreamprotected java.io.InputStream getCurrentInputStream() - Since:
- 2.0
 
 - 
getCurrentOutputStreamprotected java.io.OutputStream getCurrentOutputStream() - Since:
- 2.0
 
 - 
wrapInputStreamprotected java.io.InputStream wrapInputStream(java.io.InputStream in) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
wrapOutputStreamprotected java.io.OutputStream wrapOutputStream(java.io.OutputStream out) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
finishInputStreamprotected void finishInputStream(java.io.InputStream in) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
finishOutputStreamprotected void finishOutputStream(java.io.OutputStream out) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
executeprotected abstract void execute(BufferInputStream in, BufferOutputStream out) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 
- 
 
-