org.activeio.net
Class SocketSyncChannelFactory

java.lang.Object
  extended byorg.activeio.net.SocketSyncChannelFactory
All Implemented Interfaces:
SyncChannelFactory
Direct Known Subclasses:
JxtaSocketSyncChannelFactory, SslSocketSyncChannelFactory

public class SocketSyncChannelFactory
extends Object
implements SyncChannelFactory

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

Version:
$Revision$

Constructor Summary
SocketSyncChannelFactory()
           
SocketSyncChannelFactory(SocketFactory socketFactory, ServerSocketFactory serverSocketFactory)
           
 
Method Summary
 SyncChannelServer bindSyncChannel(URI bindURI)
          Binds a server socket a the 's port.
protected  SyncChannel createSynchChannel(SocketStreamChannel channel)
           
 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
 

Constructor Detail

SocketSyncChannelFactory

public SocketSyncChannelFactory()

SocketSyncChannelFactory

public SocketSyncChannelFactory(SocketFactory socketFactory,
                                ServerSocketFactory serverSocketFactory)
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:
SyncChannelFactory.openSyncChannel(java.net.URI)

createSynchChannel

protected SyncChannel createSynchChannel(SocketStreamChannel channel)
                                  throws IOException
Parameters:
channel -
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:
SyncChannelFactory.bindSyncChannel(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.