org.apache.mina.protocol
Interface ProtocolConnector

All Superinterfaces:
ProtocolSessionManager, SessionManager
All Known Implementing Classes:
IoProtocolConnector, VmPipeConnector

public interface ProtocolConnector
extends ProtocolSessionManager

Connects to endpoint, communicates with the server, and fires events to ProtocolProviders.

Please refer to SumUp client example.

You should connect to the desired socket address to start communication, and then events for incoming connections will be sent to the ProtocolHandler of the specified ProtocolProvider.

Threads connect to endpoint start automatically when connect(SocketAddress, ProtocolProvider) is invoked, and stop when all connection attempts are finished.

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

Method Summary
 ProtocolSession connect(SocketAddress address, int timeout, ProtocolProvider protocolProvider)
          Connects to the specified address with timeout.
 ProtocolSession connect(SocketAddress address, ProtocolProvider protocolProvider)
          Connects to the specified address.
 ProtocolSession connect(SocketAddress address, SocketAddress localAddress, int timeout, ProtocolProvider protocolProvider)
          Connects to the specified address with timeout.
 ProtocolSession connect(SocketAddress address, SocketAddress localAddress, ProtocolProvider protocolProvider)
          Connects to the specified address.
 
Methods inherited from interface org.apache.mina.protocol.ProtocolSessionManager
getFilterChain
 
Methods inherited from interface org.apache.mina.common.SessionManager
getExceptionMonitor, setExceptionMonitor
 

Method Detail

connect

ProtocolSession connect(SocketAddress address,
                        ProtocolProvider protocolProvider)
                        throws IOException
Connects to the specified address. If communication starts successfully, events are fired to the specified protocolProvider. This method blocks.

Throws:
IOException - if failed to connect

connect

ProtocolSession connect(SocketAddress address,
                        SocketAddress localAddress,
                        ProtocolProvider protocolProvider)
                        throws IOException
Connects to the specified address. If communication starts successfully, events are fired to the specified protocolProvider. This method blocks.

Parameters:
localAddress - the local address the channel is bound to
Throws:
IOException - if failed to connect

connect

ProtocolSession connect(SocketAddress address,
                        int timeout,
                        ProtocolProvider protocolProvider)
                        throws IOException
Connects to the specified address with timeout. If communication starts successfully, events are fired to the specified protocolProvider. This method blocks.

Throws:
IOException - if failed to connect

connect

ProtocolSession connect(SocketAddress address,
                        SocketAddress localAddress,
                        int timeout,
                        ProtocolProvider protocolProvider)
                        throws IOException
Connects to the specified address with timeout. If communication starts successfully, events are fired to the specified protocolProvider. This method blocks.

Parameters:
localAddress - the local address the channel is bound to
Throws:
IOException - if failed to connect


Copyright © 2004-2005 . All Rights Reserved.