|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.berkeley.psi.seda.generic.genericUdpService
public class genericUdpService
A genericUdpService is an EventHandlerIF for a SandStorm stage which accepts incoming AUdpInPackets. The server has a client sink associated with it, onto which genericConnection and genericRequest events are pushed. When a connection is closed, a SinkClosedEvent is pushed, with the sink pointer set to the genericConnection that closed.
genericConnection
,
genericRequest
Field Summary | |
---|---|
private static boolean |
DEBUG
|
protected int |
listenPort
|
protected ManagerIF |
mgr
|
protected SinkIF |
mySink
|
protected AUdpSocket |
sock
|
protected StageIF |
stage
|
Fields inherited from interface edu.berkeley.psi.seda.generic.genericConst |
---|
CRLF, DEFAULT_PORT, WRITE_CLOG_THRESHOLD |
Constructor Summary | |
---|---|
genericUdpService()
Create a generic server listening for incoming packets on the default port. |
Method Summary | |
---|---|
void |
destroy()
Called when an event handler is destroyed. |
AUdpSocket |
getServerSocket()
Return the server socket being used by this genericServer. |
(package private) SinkIF |
getSink()
|
void |
handleEvent(QueueElementIF qel)
The main event handler. |
void |
handleEvents(QueueElementIF[] qelarr)
Handle the events corresponding to the given QueueElementIF array. |
void |
init(ConfigDataIF config)
The Sandstorm stage initialization method. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final boolean DEBUG
protected int listenPort
protected AUdpSocket sock
protected ManagerIF mgr
protected StageIF stage
protected SinkIF mySink
Constructor Detail |
---|
public genericUdpService()
Method Detail |
---|
public void init(ConfigDataIF config) throws java.lang.Exception
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 qel)
handleEvent
in interface EventHandlerIF
public void handleEvents(QueueElementIF[] qelarr)
EventHandlerIF
handleEvents
in interface EventHandlerIF
public java.lang.String toString()
toString
in class java.lang.Object
SinkIF getSink()
public AUdpSocket getServerSocket()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |