org.sapia.ubik.net
Class SocketConnectionFactory
java.lang.Object
org.sapia.ubik.net.SocketConnectionFactory
- All Implemented Interfaces:
- ConnectionFactory
- Direct Known Subclasses:
- NioRmiConnectionFactory, SocketRmiConnectionFactory
public class SocketConnectionFactory
- extends java.lang.Object
- implements ConnectionFactory
Implements a factory of SocketConnection instances.
- Author:
- Yanick Duchesne
- Copyright:
- Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
- License:
- Read the license.txt file of the jar or visit the
license page at the Sapia OSS web site
|
Method Summary |
Connection |
newConnection(java.net.Socket sock)
Creates a new Connection around the given socket. |
Connection |
newConnection(java.lang.String host,
int port)
Returns a client Connection instance that connects to the
server at the given host and port. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_loader
protected java.lang.ClassLoader _loader
_clientSocketFactory
protected java.rmi.server.RMIClientSocketFactory _clientSocketFactory
SocketConnectionFactory
public SocketConnectionFactory()
SocketConnectionFactory
public SocketConnectionFactory(java.rmi.server.RMIClientSocketFactory client)
SocketConnectionFactory
public SocketConnectionFactory(java.rmi.server.RMIClientSocketFactory client,
java.lang.ClassLoader loader)
SocketConnectionFactory
public SocketConnectionFactory(java.lang.ClassLoader loader)
newConnection
public Connection newConnection(java.lang.String host,
int port)
throws java.io.IOException
- Description copied from interface:
ConnectionFactory
- Returns a client
Connection instance that connects to the
server at the given host and port.
- Specified by:
newConnection in interface ConnectionFactory
- Parameters:
host - the host to connect to.port - the port on which the server is listening at the given host.
- Throws:
java.io.IOException - if the connection instance could not be created.- See Also:
ConnectionFactory.newConnection(String, int)
newConnection
public Connection newConnection(java.net.Socket sock)
throws java.io.IOException
- Creates a new Connection around the given socket.
- Returns:
- a
SocketConnection.
- Throws:
java.io.IOException- See Also:
ConnectionFactory.newConnection(String, int)
Copyright © 2010 Sapia OSS. All Rights Reserved.