|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
ch.elca.el4j.services.tcpforwarder.UnidirectionalForwarderThread
public class UnidirectionalForwarderThread
Thread to forward got input to the output.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
BUFFER_SIZE
Is the forwarder buffer size. |
protected boolean |
m_done
Flag to mark if the forwarding is done. |
protected Socket |
m_inputSocket
Is the input source. |
protected Link |
m_link
Is the link this belongs to. |
protected Socket |
m_outputSocket
Is the output drain. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
UnidirectionalForwarderThread(Link link,
Socket inputSocket,
Socket outputSocket)
Constructor. |
|
| Method Summary | |
|---|---|
void |
halt()
Immediately stops the forwarder thread. |
boolean |
isDone()
|
void |
run()
Forwards data from input to output. |
void |
smoothHalt()
Smmothly stops the forwarder thread. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int BUFFER_SIZE
protected final Link m_link
this belongs to.
protected final Socket m_inputSocket
protected final Socket m_outputSocket
protected volatile boolean m_done
| Constructor Detail |
|---|
public UnidirectionalForwarderThread(Link link,
Socket inputSocket,
Socket outputSocket)
link - Is the link this belongs to.inputSocket - Is the input source.outputSocket - Is the output drain.| Method Detail |
|---|
public boolean isDone()
true if forwarding is done.public void run()
run in interface Runnablerun in class Threadpublic void smoothHalt()
public void halt()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||