More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

seda.sandStorm.lib.aSocket
Class aSocketEventHandler

java.lang.Object
  |
  +--seda.sandStorm.lib.aSocket.aSocketEventHandler
All Implemented Interfaces:
EventHandlerIF
Direct Known Subclasses:
ListenEventHandler, ReadEventHandler, WriteEventHandler

abstract class aSocketEventHandler
extends java.lang.Object
implements EventHandlerIF

Abstract superclass of the event handlers used by aSocket.


Field Summary
protected  SinkIF eventQ
           
protected  SelectSourceIF selsource
           
 
Constructor Summary
(package private) aSocketEventHandler()
           
 
Method Summary
abstract  void destroy()
          Called when an event handler is destroyed.
(package private)  SelectSourceIF getSelectSource()
           
abstract  void handleEvent(QueueElementIF qel)
          Handle the event corresponding to the given QueueElementIF.
abstract  void handleEvents(QueueElementIF[] qelarr)
          Handle the events corresponding to the given QueueElementIF array.
abstract  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

eventQ

protected SinkIF eventQ

selsource

protected SelectSourceIF selsource
Constructor Detail

aSocketEventHandler

aSocketEventHandler()
Method Detail

getSelectSource

SelectSourceIF getSelectSource()

init

public abstract void init(ConfigDataIF config)
Description copied from interface: EventHandlerIF
Called when an event handler is initialized. This method should perform any initialization operations as required by the application.
Specified by:
init in interface EventHandlerIF
Following copied from interface: seda.sandStorm.api.EventHandlerIF
Parameters:
config - The set of configuration parameters for the stage.
Throws:
java.lang.Exception - The EventHandler can indicate an error to the runtime during initialization by throwing an Exception.

destroy

public abstract void destroy()
Description copied from interface: EventHandlerIF
Called when an event handler is destroyed. This method should perform any cleanup or shutdown operations as required by the application before the event handler is removed from the system.
Specified by:
destroy in interface EventHandlerIF
Following copied from interface: seda.sandStorm.api.EventHandlerIF
Throws:
java.lang.Exception - The EventHandler can indicate an error to the runtime during shutdown by throwing an Exception.

handleEvent

public abstract void handleEvent(QueueElementIF qel)
Description copied from interface: EventHandlerIF
Handle the event corresponding to the given QueueElementIF. This method is invoked by the system when a single event is pending for the event handler.
Specified by:
handleEvent in interface EventHandlerIF
Following copied from interface: seda.sandStorm.api.EventHandlerIF
Throws:
EventHandlerException - The application may throw an exception to indicate an error condition during event processing.

handleEvents

public abstract void handleEvents(QueueElementIF[] qelarr)
Description copied from interface: EventHandlerIF
Handle the events corresponding to the given QueueElementIF array. This method is invoked when multiple events are pending for the event handler. The application may reorder, filter, or drop these events if it wishes to do so.
Specified by:
handleEvents in interface EventHandlerIF
Following copied from interface: seda.sandStorm.api.EventHandlerIF
Throws:
EventHandlerException - The application may throw an exception to indicate an error condition during event processing.

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/