org.activeio.net
Class SocketStreamChannelFactory

java.lang.Object
  extended by org.activeio.net.SocketStreamChannelFactory
All Implemented Interfaces:
StreamChannelFactory

public class SocketStreamChannelFactory
extends Object
implements StreamChannelFactory

A TcpStreamChannelFactory creates org.activeio.net.TcpStreamChannel and org.activeio.net.TcpStreamChannelServer objects.

Version:
$Revision$

Field Summary
protected static int DEFAULT_BACKLOG
           
 
Constructor Summary
SocketStreamChannelFactory()
           
SocketStreamChannelFactory(SocketFactory socketFactory, ServerSocketFactory serverSocketFactory)
           
 
Method Summary
 StreamChannelServer bindStreamChannel(URI bindURI)
          Binds a server socket a the 's port.
protected  StreamChannel createStreamChannel(Socket socket)
           
 int getBacklog()
           
 StreamChannel openStreamChannel(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_BACKLOG

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

SocketStreamChannelFactory

public SocketStreamChannelFactory()

SocketStreamChannelFactory

public SocketStreamChannelFactory(SocketFactory socketFactory,
                                  ServerSocketFactory serverSocketFactory)
Method Detail

openStreamChannel

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

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

createStreamChannel

protected StreamChannel createStreamChannel(Socket socket)
                                     throws IOException
Parameters:
socket -
Returns:
Throws:
IOException

bindStreamChannel

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

Specified by:
bindStreamChannel in interface StreamChannelFactory
Returns:
Throws:
IOException
See Also:
StreamChannelFactory.bindStreamChannel(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.