net.sf.cindy.session.dispatcher
Class DefaultDispatcher

java.lang.Object
  extended by net.sf.cindy.session.dispatcher.DefaultDispatcher
All Implemented Interfaces:
Dispatcher

public class DefaultDispatcher
extends java.lang.Object
implements Dispatcher

Default dispatcher implementation, support block operation such as Future.complete.

Version:
$id$
Author:
Roger Chen

Constructor Summary
DefaultDispatcher()
           
 
Method Summary
 void block()
          The dispatch thread may be blocked.
 void dispatch(Session session, java.lang.Runnable event)
          Dispatch event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDispatcher

public DefaultDispatcher()
Method Detail

dispatch

public void dispatch(Session session,
                     java.lang.Runnable event)
Description copied from interface: Dispatcher
Dispatch event.

Specified by:
dispatch in interface Dispatcher
Parameters:
session - session
event - event

block

public void block()
Description copied from interface: Dispatcher
The dispatch thread may be blocked. When application invoke Future.completed method, the Future implementation will invoke this method to block current dispatch thread.

Specified by:
block in interface Dispatcher