org.jscience.net
Class NetConnectionServer.DefaultDispatcher

java.lang.Object
  extended by org.jscience.net.NetConnectionServer.DefaultDispatcher
All Implemented Interfaces:
ConnectionDispatcher
Enclosing class:
NetConnectionServer

public static class NetConnectionServer.DefaultDispatcher
extends java.lang.Object
implements ConnectionDispatcher

The DefaultDispatcher provides a default ConnectionDispatcher that is used when the NetConnectionServer constructor in the enclosing class is called with a NetConnectionHandler


Constructor Summary
NetConnectionServer.DefaultDispatcher(NetConnectionHandler handler, java.lang.Object signature)
          Creates a new DefaultDispatcher object.
NetConnectionServer.DefaultDispatcher(NetConnectionHandler handler, java.lang.Object signature, Logger logger)
          if logger is not null, it will be used to log established and closed connections
 
Method Summary
 java.lang.Thread createHandlerThread(NetConnection con)
          uses a MessageDelegator instance as Runnable; the DefaultDispatcher's logger is passed to the MessageDelegator.
 java.lang.Object getConnectionSignature()
          DOCUMENT ME!
 Logger getLogger()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetConnectionServer.DefaultDispatcher

public NetConnectionServer.DefaultDispatcher(NetConnectionHandler handler,
                                             java.lang.Object signature)
Creates a new DefaultDispatcher object.

Parameters:
handler - DOCUMENT ME!
signature - DOCUMENT ME!

NetConnectionServer.DefaultDispatcher

public NetConnectionServer.DefaultDispatcher(NetConnectionHandler handler,
                                             java.lang.Object signature,
                                             Logger logger)
if logger is not null, it will be used to log established and closed connections

Method Detail

createHandlerThread

public java.lang.Thread createHandlerThread(NetConnection con)
uses a MessageDelegator instance as Runnable; the DefaultDispatcher's logger is passed to the MessageDelegator.

Specified by:
createHandlerThread in interface ConnectionDispatcher
See Also:
MessageDelegator

getConnectionSignature

public java.lang.Object getConnectionSignature()
DOCUMENT ME!

Specified by:
getConnectionSignature in interface ConnectionDispatcher
Returns:
DOCUMENT ME!

getLogger

public Logger getLogger()
DOCUMENT ME!

Returns:
DOCUMENT ME!