org.codehaus.spice.netserve.sockets.impl
Class DefaultSocketFactory
java.lang.Object
org.codehaus.spice.netserve.sockets.impl.DefaultSocketFactory
- All Implemented Interfaces:
- SocketFactory
- public class DefaultSocketFactory
- extends Object
- implements SocketFactory
A SocketFactory that creates vanilla sockets.
- Version:
- $Revision: 1.2 $ $Date: 2004/03/21 23:42:59 $
- Author:
- Peter Donald
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSocketFactory
public DefaultSocketFactory()
createSocket
public Socket createSocket(InetAddress address,
int port)
throws IOException
- Create a socket that connects to specified remote address.
- Specified by:
createSocket
in interface SocketFactory
- Parameters:
address
- the remote addressport
- the remote port
- Returns:
- the socket connected to remote address
- Throws:
IOException
- if unable to create socket
createSocket
public Socket createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort)
throws IOException
- Create a socket that connects to specified remote address and
originates from specified local address.
- Specified by:
createSocket
in interface SocketFactory
- Parameters:
address
- the remote addressport
- the remote portlocalAddress
- the local addresslocalPort
- the local port
- Returns:
- the socket connected to remote address
- Throws:
IOException
- if unable to create socket
Copyright © 1999-2004 Codehaus. All Rights Reserved.