net.sf.cindy.session.dispatcher
Class DirectDispatcher

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

public class DirectDispatcher
extends java.lang.Object
implements Dispatcher

Direct dispatcher implementation, do not support block operation such as Future.complete.

Version:
$id$
Author:
Roger Chen

Constructor Summary
DirectDispatcher()
           
 
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

DirectDispatcher

public DirectDispatcher()
Method Detail

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

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