org.activeio.net
Class NIOAsyncChannelFactory

java.lang.Object
  extended by org.activeio.net.NIOAsyncChannelFactory
All Implemented Interfaces:
AsyncChannelFactory

public class NIOAsyncChannelFactory
extends Object
implements AsyncChannelFactory

A TcpAsyncChannelFactory creates org.activeio.net.TcpAsyncChannel and org.activeio.net.TcpAsyncChannelServer objects.

Version:
$Revision$

Field Summary
protected static int DEFAULT_BACKLOG
           
protected static int DEFAULT_BUFFER_SIZE
           
 
Constructor Summary
NIOAsyncChannelFactory()
           
NIOAsyncChannelFactory(boolean createWriteBufferedChannels)
           
 
Method Summary
 AsyncChannelServer bindAsyncChannel(URI bindURI)
          Binds a server socket a the 's port.
protected  AsyncChannel createAsyncChannel(SocketChannel socketChannel)
           
 int getBacklog()
           
 AsyncChannel openAsyncChannel(URI location)
          Uses the 's host and port to create a tcp connection to a remote host.
 void setBacklog(int backlog)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

protected static final int DEFAULT_BUFFER_SIZE

DEFAULT_BACKLOG

protected static final int DEFAULT_BACKLOG
See Also:
Constant Field Values
Constructor Detail

NIOAsyncChannelFactory

public NIOAsyncChannelFactory()

NIOAsyncChannelFactory

public NIOAsyncChannelFactory(boolean createWriteBufferedChannels)
Method Detail

openAsyncChannel

public AsyncChannel openAsyncChannel(URI location)
                              throws IOException
Uses the 's host and port to create a tcp connection to a remote host.

Specified by:
openAsyncChannel in interface AsyncChannelFactory
Returns:
Throws:
IOException
See Also:
AsyncChannelFactory.openAsyncChannel(java.net.URI)

createAsyncChannel

protected AsyncChannel createAsyncChannel(SocketChannel socketChannel)
                                   throws IOException
Parameters:
channel -
Returns:
Throws:
IOException

bindAsyncChannel

public AsyncChannelServer bindAsyncChannel(URI bindURI)
                                    throws IOException
Binds a server socket a the 's port.

Specified by:
bindAsyncChannel in interface AsyncChannelFactory
Returns:
Throws:
IOException
See Also:
AsyncChannelFactory.bindAsyncChannel(java.net.URI)

getBacklog

public int getBacklog()
Returns:
Returns the backlog.

setBacklog

public void setBacklog(int backlog)
Parameters:
backlog - The backlog to set.


Copyright © -2009 The ActiveIO Project. All Rights Reserved.