|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.sun.slamd.example.TCPReplayReadThread
public class TCPReplayReadThread
This class defines a thread that works in conjunction with the TCPReplay job to read any data returned on any of the connections associated with the job threads.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TCPReplayReadThread(TCPReplayJobClass tcpReplayJob)
Creates a new instance of this TCPReplay read thread that will be used to read data from connections associated with the provided TCPReplay job. |
|
| Method Summary | |
|---|---|
void |
registerJobThread()
Registers a provided job thread with this read thread to indicate that it will be sending connections to this thread for reading. |
void |
registerSocketChannel(java.nio.channels.SocketChannel socketChannel)
Registers the provided socket channel with this read thread so that any incoming data available on that connection will be read. |
void |
run()
Loops, waiting for data to be available on any of the registered connections, reading it as it becomes available. |
void |
threadDone()
Deregisters a job thread from this read thread to indicate that it will no longer be sending connections to this thread for reading. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TCPReplayReadThread(TCPReplayJobClass tcpReplayJob)
throws java.io.IOException
tcpReplayJob - The TCPReplay job instance for which this thread
should read all data from the server.
java.io.IOException - If a problem occurs while creating the associated
selector.| Method Detail |
|---|
public void registerJobThread()
public void threadDone()
public void registerSocketChannel(java.nio.channels.SocketChannel socketChannel)
socketChannel - The socket channel to be registered. It must
already be configured in non-blocking mode.public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||