org.apache.mina.protocol.io
Class IoProtocolAcceptor

java.lang.Object
  extended by org.apache.mina.protocol.io.IoProtocolAcceptor
All Implemented Interfaces:
SessionManager, ProtocolAcceptor, ProtocolSessionManager

public class IoProtocolAcceptor
extends Object
implements ProtocolAcceptor

A ProtocolAcceptor which wraps IoAcceptor to provide low-level I/O.

Please note that the user-defined attributes of ProtocolSession and its wrapping IoSession are shared.

Version:
$Rev: 210062 $, $Date: 2005-07-11 12:52:38 +0900 $
Author:
Trustin Lee (trustin@apache.org)

Constructor Summary
IoProtocolAcceptor(IoAcceptor acceptor)
          Creates a new instance with the specified IoAcceptor.
 
Method Summary
 void bind(SocketAddress address, ProtocolProvider provider)
          Binds to the specified address and handles incoming connections with the specified protocolProvider.
 ExceptionMonitor getExceptionMonitor()
          Returns the current exception monitor.
 ProtocolFilterChain getFilterChain()
          Returns the filter chain that filters all events which is related with sessions this manager manages.
 IoAcceptor getIoAcceptor()
          Returns the underlying IoAcceptor instance this acceptor is wrapping.
 void setExceptionMonitor(ExceptionMonitor monitor)
          Sets the uncaught exception monitor.
 void unbind(SocketAddress address)
          Unbinds from the specified address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IoProtocolAcceptor

public IoProtocolAcceptor(IoAcceptor acceptor)
Creates a new instance with the specified IoAcceptor.

Method Detail

getIoAcceptor

public IoAcceptor getIoAcceptor()
Returns the underlying IoAcceptor instance this acceptor is wrapping.


bind

public void bind(SocketAddress address,
                 ProtocolProvider provider)
          throws IOException
Description copied from interface: ProtocolAcceptor
Binds to the specified address and handles incoming connections with the specified protocolProvider.

Specified by:
bind in interface ProtocolAcceptor
Throws:
IOException - if failed to bind

unbind

public void unbind(SocketAddress address)
Description copied from interface: ProtocolAcceptor
Unbinds from the specified address.

Specified by:
unbind in interface ProtocolAcceptor

getFilterChain

public ProtocolFilterChain getFilterChain()
Description copied from interface: ProtocolSessionManager
Returns the filter chain that filters all events which is related with sessions this manager manages.

Specified by:
getFilterChain in interface ProtocolSessionManager

getExceptionMonitor

public ExceptionMonitor getExceptionMonitor()
Description copied from interface: SessionManager
Returns the current exception monitor.

Specified by:
getExceptionMonitor in interface SessionManager

setExceptionMonitor

public void setExceptionMonitor(ExceptionMonitor monitor)
Description copied from interface: SessionManager
Sets the uncaught exception monitor. If null is specified, a new instance of DefaultExceptionMonitor will be set.

Specified by:
setExceptionMonitor in interface SessionManager
Parameters:
monitor - A new instance of DefaultExceptionMonitor is set if null is specified.


Copyright © 2004-2005 . All Rights Reserved.