|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.epics.caj.impl.reactor.lf.LeaderFollowersHandler
public class LeaderFollowersHandler
Decorator pattern to 'decorate' application-specific event processing handler to work with Leader/Followers deisgn pattern. This decorator promotes a new leader thread and disables/enables the handler.
| Field Summary | |
|---|---|
protected ReactorHandler |
handler
Application-specific event processing handler. |
protected Reactor |
reactor
Reactor to serve. |
protected LeaderFollowersThreadPool |
threadPool
Leader-followers thread pool. |
| Constructor Summary | |
|---|---|
LeaderFollowersHandler(Reactor reactor,
ReactorHandler handler,
LeaderFollowersThreadPool threadPool)
Constructor. |
|
| Method Summary | |
|---|---|
void |
handleEvent(SelectionKey key)
Process request of given SelectionKey. |
void |
run()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Reactor reactor
protected ReactorHandler handler
protected LeaderFollowersThreadPool threadPool
| Constructor Detail |
|---|
public LeaderFollowersHandler(Reactor reactor,
ReactorHandler handler,
LeaderFollowersThreadPool threadPool)
reactor - reactor to handle.handler - application-specific event processing handler.threadPool - leader-followers thread pool.| Method Detail |
|---|
public void handleEvent(SelectionKey key)
ReactorHandlerSelectionKey.
handleEvent in interface ReactorHandlerkey - key to be processed.ReactorHandler.handleEvent(java.nio.channels.SelectionKey)public void run()
run in interface RunnableRunnable.run()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||