org.activeio.net
Class NIOSyncChannelFactory

java.lang.Object
  extended byorg.activeio.net.NIOSyncChannelFactory
All Implemented Interfaces:
SyncChannelFactory

public class NIOSyncChannelFactory
extends Object
implements SyncChannelFactory

A TcpSynchChannelFactory creates org.activeio.net.TcpSynchChannel and org.activeio.net.TcpSynchChannelServer objects.

Version:
$Revision$

Field Summary
protected static int DEFAULT_BACKLOG
           
protected static int DEFAULT_BUFFER_SIZE
           
 
Constructor Summary
NIOSyncChannelFactory()
           
NIOSyncChannelFactory(boolean createWriteBufferedChannels)
           
 
Method Summary
 SyncChannelServer bindSyncChannel(URI bindURI)
          Binds a server socket a the 's port.
protected  SyncChannel createSynchChannel(SocketChannel socketChannel)
           
 int getBacklog()
           
 SyncChannel openSyncChannel(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

NIOSyncChannelFactory

public NIOSyncChannelFactory()

NIOSyncChannelFactory

public NIOSyncChannelFactory(boolean createWriteBufferedChannels)
Method Detail

openSyncChannel

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

Specified by:
openSyncChannel in interface SyncChannelFactory
Parameters:
location -
Returns:
Throws:
IOException
See Also:
org.activeio.SynchChannelFactory#openSynchChannel(java.net.URI)

createSynchChannel

protected SyncChannel createSynchChannel(SocketChannel socketChannel)
                                  throws IOException
Returns:
Throws:
IOException

bindSyncChannel

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

Specified by:
bindSyncChannel in interface SyncChannelFactory
Parameters:
bindURI -
Returns:
Throws:
IOException
See Also:
org.activeio.SynchChannelFactory#bindSynchChannel(java.net.URI)

getBacklog

public int getBacklog()
Returns:
Returns the backlog.

setBacklog

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


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