XNIO version 1.2.1.GA

org.jboss.xnio
Interface TcpConnector

All Superinterfaces:
Connector<SocketAddress,TcpChannel>
All Known Subinterfaces:
CloseableTcpConnector

public interface TcpConnector
extends Connector<SocketAddress,TcpChannel>

A connector specifically for connecting to TCP servers.


Method Summary
 FutureConnection<SocketAddress,TcpChannel> connectTo(SocketAddress dest, IoHandler<? super TcpChannel> handler)
          Establish a connection to a TCP server.
 FutureConnection<SocketAddress,TcpChannel> connectTo(SocketAddress src, SocketAddress dest, IoHandler<? super TcpChannel> handler)
          Establish a connection to a TCP server.
 TcpChannelSource createChannelSource(SocketAddress dest)
          Create a client that always connects to the given TCP server.
 TcpChannelSource createChannelSource(SocketAddress src, SocketAddress dest)
          Create a client that always connects to the given TCP server from the given source address.
 

Method Detail

connectTo

FutureConnection<SocketAddress,TcpChannel> connectTo(SocketAddress dest,
                                                     IoHandler<? super TcpChannel> handler)
Establish a connection to a TCP server.

Specified by:
connectTo in interface Connector<SocketAddress,TcpChannel>
Parameters:
dest - the destination address
handler - the handler for this connection
Returns:
the future result of this operation

connectTo

FutureConnection<SocketAddress,TcpChannel> connectTo(SocketAddress src,
                                                     SocketAddress dest,
                                                     IoHandler<? super TcpChannel> handler)
Establish a connection to a TCP server.

Specified by:
connectTo in interface Connector<SocketAddress,TcpChannel>
Parameters:
src - the source address
dest - the destination address
handler - the handler for this connection
Returns:
the future result of this operation

createChannelSource

TcpChannelSource createChannelSource(SocketAddress dest)
Create a client that always connects to the given TCP server.

Specified by:
createChannelSource in interface Connector<SocketAddress,TcpChannel>
Parameters:
dest - the destination to connect to
Returns:
the client

createChannelSource

TcpChannelSource createChannelSource(SocketAddress src,
                                     SocketAddress dest)
Create a client that always connects to the given TCP server from the given source address.

Specified by:
createChannelSource in interface Connector<SocketAddress,TcpChannel>
Parameters:
src - the source to connect from
dest - the destination to connect to
Returns:
the client

XNIO version 1.2.1.GA

Copyright © 2008 JBoss, a division of Red Hat, Inc.