Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.common
Interface IoConnector

All Superinterfaces:
  IoService

All Known Implementing Classes:
  org.apache.mina.common.support.BaseIoConnector, DatagramConnector, org.apache.mina.common.support.DelegatedIoConnector, SocketConnector, VmPipeConnector

    public interface IoConnector

extends IoService

Connects to endpoint, communicates with the server, and fires events to `IoHandler`s.

Please refer to NetCat example.

You should connect to the desired socket address to start communication, and then events for incoming connections will be sent to the specified default `IoHandler`.

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

Version:
  $Rev: 555855 $, $Date: 2007-07-13 05:19:00 +0200 (Fri, 13 Jul 2007) $
Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Method Summary
`ConnectFuture` | `connect(SocketAddress address, IoHandler handler)` Connects to the specified `address`.
`ConnectFuture` | `connect(SocketAddress address, IoHandler handler, IoServiceConfig config)` Connects to the specified `address`.
`ConnectFuture` | `connect(SocketAddress address, SocketAddress localAddress, IoHandler handler)` Connects to the specified `address`.
`ConnectFuture` | `connect(SocketAddress address, SocketAddress localAddress, IoHandler handler, IoServiceConfig config)` Connects to the specified `address`.

Methods inherited from interface org.apache.mina.common.IoService
`addListener, getDefaultConfig, getFilterChain, getFilterChainBuilder, getManagedServiceAddresses, getManagedSessions, isManaged, removeListener, setFilterChainBuilder`

Method Detail

### connect

    ConnectFuture connect(SocketAddress address,
                          IoHandler handler)

  Connects to the specified `address`. If communication starts successfully, events are fired to the specified `handler`.

  Returns:
    `ConnectFuture` that will tell the result of the connection attempt

### connect

    ConnectFuture connect(SocketAddress address,
                          IoHandler handler,
                          IoServiceConfig config)

  Connects to the specified `address`. If communication starts successfully, events are fired to the specified `handler`.

  Parameters:
    `config` - the configuration
  Returns:
    `ConnectFuture` that will tell the result of the connection attempt

### connect

    ConnectFuture connect(SocketAddress address,
                          SocketAddress localAddress,
                          IoHandler handler)

  Connects to the specified `address`. If communication starts successfully, events are fired to the specified `handler`.

  Parameters:
    `localAddress` - the local address the channel is bound to
  Returns:
    `ConnectFuture` that will tell the result of the connection attempt

### connect

    ConnectFuture connect(SocketAddress address,
                          SocketAddress localAddress,
                          IoHandler handler,
                          IoServiceConfig config)

  Connects to the specified `address`. If communication starts successfully, events are fired to the specified `handler`.

  Parameters:
    `config` - the configuration
  Returns:
    `ConnectFuture` that will tell the result of the connection attempt

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.