|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object TaskRecvWorker
public class TaskRecvWorker
This event handmler listens for connections on the TCP port PORT and accepts packets of size TASK_SIZE. For each packet it delivers a BufferElement to the next handler on the chain, specified by the "next_handler" argument.
Field Summary | |
---|---|
private SinkIF |
completionWorker
|
private int |
cur_offset
|
private byte[] |
cur_task
|
private static boolean |
DEBUG
|
private static boolean |
DISPATCH_SPIN
|
private ATcpConnection |
incomingConnection
|
private SinkIF |
mySink
|
private SinkIF |
nextWorker
|
private int |
PORT
|
private ATcpServerSocket |
servsock
|
private int |
TASK_SIZE
|
Constructor Summary | |
---|---|
TaskRecvWorker()
|
Method Summary | |
---|---|
void |
destroy()
Called when an event handler is destroyed. |
void |
handleEvent(QueueElementIF item)
Handle the event corresponding to the given QueueElementIF. |
void |
handleEvents(QueueElementIF[] items)
Handle the events corresponding to the given QueueElementIF array. |
void |
init(ConfigDataIF config)
Called when an event handler is initialized. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean DEBUG
private static final boolean DISPATCH_SPIN
private SinkIF mySink
private SinkIF nextWorker
private SinkIF completionWorker
private ATcpConnection incomingConnection
private ATcpServerSocket servsock
private int PORT
private int TASK_SIZE
private byte[] cur_task
private int cur_offset
Constructor Detail |
---|
public TaskRecvWorker()
Method Detail |
---|
public void init(ConfigDataIF config) throws java.lang.Exception
EventHandlerIF
init
in interface EventHandlerIF
config
- The set of configuration parameters for the stage.
java.lang.Exception
- The EventHandler can indicate an
error to the runtime during initialization by throwing an
Exception.public void destroy()
EventHandlerIF
destroy
in interface EventHandlerIF
public void handleEvent(QueueElementIF item)
EventHandlerIF
handleEvent
in interface EventHandlerIF
public void handleEvents(QueueElementIF[] items)
EventHandlerIF
handleEvents
in interface EventHandlerIF
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |