org.objectweb.david.libs.resources.giop
Class GIOPConnectionFactory

java.lang.Object
  extended byorg.objectweb.david.libs.resources.giop.GIOPConnectionFactory
All Implemented Interfaces:
TcpIpConnectionMgr

public class GIOPConnectionFactory
extends java.lang.Object
implements TcpIpConnectionMgr

GIOP connection factory: it extends JConnectionManager to let the appropriate messages be sent when a server connection is closed.


Constructor Summary
GIOPConnectionFactory(TcpIpConnectionMgr connection_manager)
           
 
Method Summary
 java.lang.String getCanonicalHostName(java.lang.String hostname)
          Returns the canonical host name for hostname, using the delegate manager.
 IpConnection newCltConnection(java.lang.String host, int port, IpSession session)
          Returns a new client connection.
 TcpIpSrvConnectionFactory newSrvConnectionFactory(int port)
          Returns a new server connection factory encapsulating a server socket on the provided port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GIOPConnectionFactory

public GIOPConnectionFactory(TcpIpConnectionMgr connection_manager)
Method Detail

getCanonicalHostName

public java.lang.String getCanonicalHostName(java.lang.String hostname)
Returns the canonical host name for hostname, using the delegate manager.

Specified by:
getCanonicalHostName in interface TcpIpConnectionMgr
Parameters:
hostname - a host name.
Returns:
the canonical host name for hostname.

newCltConnection

public IpConnection newCltConnection(java.lang.String host,
                                     int port,
                                     IpSession session)
                              throws org.objectweb.jonathan.apis.kernel.JonathanException
Returns a new client connection.

Specified by:
newCltConnection in interface TcpIpConnectionMgr
Parameters:
host - the host name of the distant server;
port - the port number of a server socket on that host;
session - a TcpIp session
Returns:
a connection for that session.
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if an error occurs.

newSrvConnectionFactory

public TcpIpSrvConnectionFactory newSrvConnectionFactory(int port)
                                                  throws org.objectweb.jonathan.apis.kernel.JonathanException
Returns a new server connection factory encapsulating a server socket on the provided port. If port = 0, an anonymous server socket is opened.

Specified by:
newSrvConnectionFactory in interface TcpIpConnectionMgr
Parameters:
port - the expected port of the server socket;
Returns:
a server connection factory.
Throws:
org.objectweb.jonathan.apis.kernel.JonathanException - if an error occurs.