org.activeio.net
Class SocketStreamChannelFactory
java.lang.Object
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$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_BACKLOG
protected static final int DEFAULT_BACKLOG
- See Also:
- Constant Field Values
SocketStreamChannelFactory
public SocketStreamChannelFactory()
SocketStreamChannelFactory
public SocketStreamChannelFactory(SocketFactory socketFactory,
ServerSocketFactory serverSocketFactory)
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.