org.eclipse.net4j.signal
Class Signal
java.lang.Object
org.eclipse.net4j.signal.Signal
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- SignalActor, SignalReactor
- public abstract class Signal
- extends Object
- implements Runnable
Represents a single communications use-case in the scope of a signal protocol
.
NO_TIMEOUT
public static final long NO_TIMEOUT
- Since:
- 2.0
- See Also:
- Constant Field Values
Signal
public Signal(SignalProtocol<?> protocol,
short id,
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
Signal
public Signal(SignalProtocol<?> protocol,
short id)
- Since:
- 2.0
- See Also:
Signal(SignalProtocol, short, String)
Signal
public Signal(SignalProtocol<?> protocol,
Enum<?> literal)
- Since:
- 2.0
- See Also:
Signal(SignalProtocol, short, String)
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
toString
public String toString()
- Overrides:
toString
in class Object
- Since:
- 2.0
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
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
execute
protected abstract void execute(BufferInputStream in,
BufferOutputStream out)
throws Exception
- Throws:
Exception
Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.