|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpyrasun.eio.EndpointCoordinator
An EndpointCoordinator is used coordinate activity for a given type of endpoint. A bit less cryptically, the EndpointCoordinator receives I/O events from the EIOEventManager for specific endpoints, and routes them to the appropriate workers. It's also the centralized location where a user tells EIO how to handle a given type of Endpoint. If it helps - you could probably change the name of this to EndpointType, to indicate that it represents a specific type or flavor of Endpoint. In fact, it used to be called that. In fact, I really don't know _what_ to call this. I'll send a free copy of the EmberIO source to anyone who comes up with a really effective name!
| Constructor Summary | |
EndpointCoordinator(EIOGlobalContext context,
java.lang.String name,
EIOWorkerFactory factory,
EIOPoolingStrategy strategy)
Construct a new EndpointCoordinator. |
|
| Method Summary | |
void |
dumpEndpoints()
Only here for debugging purposes |
EIOGlobalContext |
getContext()
Get the global context associated with this EndpointCoordinator. |
EIOEventDescriptor |
getEventDescriptor(EIOEvent event)
Return an event descriptor that defines this coordinator's pooling strategy for a given event. |
EIOEventManager |
getEventManager()
Get the event manager associated with this coordinator |
java.lang.String |
getName()
Get the wetware readable name for this coordinator. |
void |
handleEvent(Endpoint endpoint)
|
void |
registerForEvents(Endpoint endpoint)
Register the given endpoint to receive events. |
void |
removeEndpoint(Endpoint endpoint)
|
void |
start()
Start this EndpointCoordinator - generally initializes all of the worker threads associated with this coordinator. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public EndpointCoordinator(EIOGlobalContext context,
java.lang.String name,
EIOWorkerFactory factory,
EIOPoolingStrategy strategy)
context - the global context this coordinator will be running withinname - a wetware readable name for this componentfactory - A factory to use to construct workers. These workers are used to service events fired against endpoints of this type.strategy - the strategy used to handle endpoints of this type.| Method Detail |
public EIOGlobalContext getContext()
public EIOEventDescriptor getEventDescriptor(EIOEvent event)
public void start()
public EIOEventManager getEventManager()
public void handleEvent(Endpoint endpoint)
public void registerForEvents(Endpoint endpoint)
public void removeEndpoint(Endpoint endpoint)
public void dumpEndpoints()
public java.lang.String getName()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||