org.apache.avalon.cornerstone.blocks.sockets
Class DefaultSocketFactory
java.lang.Object
|
+--org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory
- All Implemented Interfaces:
- org.apache.avalon.cornerstone.services.sockets.SocketFactory
- public class DefaultSocketFactory
- extends Object
- implements org.apache.avalon.cornerstone.services.sockets.SocketFactory
The vanilla implementation of SocketFactory.
- 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 and connect to remote address specified.
- Specified by:
createSocket
in interface org.apache.avalon.cornerstone.services.sockets.SocketFactory
- Parameters:
address
- the remote addressport
- the remote port
- Returns:
- the socket
- Throws:
IOException
- if an error occurs
createSocket
public Socket createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort)
throws IOException
- Create a socket and connect to remote address specified
originating from specified local address.
- Specified by:
createSocket
in interface org.apache.avalon.cornerstone.services.sockets.SocketFactory
- Parameters:
address
- the remote addressport
- the remote portlocalAddress
- the local addresslocalPort
- the local port
- Returns:
- the socket
- Throws:
IOException
- if an error occurs
Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.