public abstract class Signal extends Object implements Runnable
signal protocol
.Modifier and Type | Field and Description |
---|---|
static long |
NO_TIMEOUT |
Constructor and Description |
---|
Signal(SignalProtocol<?> protocol,
Enum<?> literal) |
Signal(SignalProtocol<?> protocol,
short id) |
Signal(SignalProtocol<?> protocol,
short id,
String name)
Both implementation classes of a logical signal must have the same signalID.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
execute(BufferInputStream in,
BufferOutputStream out) |
protected void |
finishInputStream(InputStream in) |
protected void |
finishOutputStream(OutputStream out) |
protected void |
flush() |
protected BufferInputStream |
getBufferInputStream() |
protected BufferOutputStream |
getBufferOutputStream() |
int |
getCorrelationID() |
protected InputStream |
getCurrentInputStream() |
protected OutputStream |
getCurrentOutputStream() |
short |
getID()
Returns the short integer ID of this signal that is unique among all signals of the associated
protocol . |
String |
getName() |
SignalProtocol<?> |
getProtocol() |
void |
run() |
String |
toString() |
protected InputStream |
wrapInputStream(InputStream in) |
protected OutputStream |
wrapOutputStream(OutputStream out) |
public static final long NO_TIMEOUT
public Signal(SignalProtocol<?> protocol, short id, String name)
public Signal(SignalProtocol<?> protocol, short id)
Signal(SignalProtocol, short, String)
public Signal(SignalProtocol<?> protocol, Enum<?> literal)
Signal(SignalProtocol, short, String)
public SignalProtocol<?> getProtocol()
public final short getID()
protocol
.public String getName()
public final int getCorrelationID()
protected final BufferInputStream getBufferInputStream()
protected final BufferOutputStream getBufferOutputStream()
protected final void flush() throws IOException
IOException
protected InputStream getCurrentInputStream()
protected OutputStream getCurrentOutputStream()
protected InputStream wrapInputStream(InputStream in) throws IOException
IOException
protected OutputStream wrapOutputStream(OutputStream out) throws IOException
IOException
protected void finishInputStream(InputStream in) throws IOException
IOException
protected void finishOutputStream(OutputStream out) throws IOException
IOException
protected abstract void execute(BufferInputStream in, BufferOutputStream out) throws Exception
Exception
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.