org.apache.mina.protocol.io
Class IoProtocolConnector

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

public class IoProtocolConnector
extends Object
implements ProtocolConnector

A ProtocolConnector which wraps IoConnector to provide low-level I/O.

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

Version:
$Rev: 332218 $, $Date: 2005-11-10 12:52:42 +0900 $
Author:
The Apache Directory Project (dev@directory.apache.org)

Constructor Summary
IoProtocolConnector(IoConnector connector)
          Creates a new instance with the specified IoConnector.
 
Method Summary
 ProtocolSession connect(SocketAddress address, int timeout, ProtocolProvider provider)
          Connects to the specified address with timeout.
 ProtocolSession connect(SocketAddress address, ProtocolProvider provider)
          Connects to the specified address.
 ProtocolSession connect(SocketAddress address, SocketAddress localAddress, int timeout, ProtocolProvider provider)
          Connects to the specified address with timeout.
 ProtocolSession connect(SocketAddress address, SocketAddress localAddress, ProtocolProvider provider)
          Connects to the specified address.
 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.
 IoConnector getIoConnector()
          Returns the underlying IoConnector instance this acceptor is wrapping.
 void setExceptionMonitor(ExceptionMonitor monitor)
          Sets the uncaught exception monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IoProtocolConnector

public IoProtocolConnector(IoConnector connector)
Creates a new instance with the specified IoConnector.

Method Detail

getIoConnector

public IoConnector getIoConnector()
Returns the underlying IoConnector instance this acceptor is wrapping.


connect

public ProtocolSession connect(SocketAddress address,
                               ProtocolProvider provider)
                        throws IOException
Description copied from interface: ProtocolConnector
Connects to the specified address. If communication starts successfully, events are fired to the specified protocolProvider. This method blocks.

Specified by:
connect in interface ProtocolConnector
Throws:
IOException - if failed to connect

connect

public ProtocolSession connect(SocketAddress address,
                               SocketAddress localAddress,
                               ProtocolProvider provider)
                        throws IOException
Description copied from interface: ProtocolConnector
Connects to the specified address. If communication starts successfully, events are fired to the specified protocolProvider. This method blocks.

Specified by:
connect in interface ProtocolConnector
localAddress - the local address the channel is bound to
Throws:
IOException - if failed to connect

connect

public ProtocolSession connect(SocketAddress address,
                               int timeout,
                               ProtocolProvider provider)
                        throws IOException
Description copied from interface: ProtocolConnector
Connects to the specified address with timeout. If communication starts successfully, events are fired to the specified protocolProvider. This method blocks.

Specified by:
connect in interface ProtocolConnector
Throws:
IOException - if failed to connect

connect

public ProtocolSession connect(SocketAddress address,
                               SocketAddress localAddress,
                               int timeout,
                               ProtocolProvider provider)
                        throws IOException
Description copied from interface: ProtocolConnector
Connects to the specified address with timeout. If communication starts successfully, events are fired to the specified protocolProvider. This method blocks.

Specified by:
connect in interface ProtocolConnector
localAddress - the local address the channel is bound to
Throws:
IOException - if failed to connect

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.