org.openorb.orb.iiop
Class IIOPTransportServerInitializer

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.openorb.orb.iiop.IIOPTransportServerInitializer
All Implemented Interfaces:
Initializer, org.apache.avalon.framework.logger.LogEnabled, TransportServerInitializer

public class IIOPTransportServerInitializer
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements TransportServerInitializer, Initializer

Interface for creating sockets.

Version:
$Revision: 1.11 $ $Date: 2004/02/10 21:02:49 $
Author:
Chris Wood

Constructor Summary
IIOPTransportServerInitializer()
          Any replacement classes must implement an identical constructor.
 
Method Summary
 Transport accept(int timeout)
          Listen for an incoming connection.
 void close()
          Stop listening for a connection.
 org.omg.IIOP.ListenPoint[] getBiDirEndpoints()
          Get the list of endpoints allowed for bidirectional use.
protected  java.net.InetAddress getListenHost()
          Get the listen host.
 java.lang.String getName()
          Return the name of the initializer.
 org.omg.IIOP.ListenPoint getPrimaryEndpoint()
          Get the primary endpoint published in the IIOP profile.
 void init(org.omg.PortableInterceptor.ORBInitInfo orbinfo, FeatureInitInfo featureinfo)
          Initialize method.
 boolean isOpen()
          Is is the transport open?
 void open()
          Start listening for incoming connections.
protected  java.lang.String svrString()
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IIOPTransportServerInitializer

public IIOPTransportServerInitializer()
Any replacement classes must implement an identical constructor.
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Initializer
Return the name of the initializer.
Specified by:
getName in interface Initializer
Following copied from interface: org.openorb.orb.Initializer
Returns:
The name of the initializer.

init

public void init(org.omg.PortableInterceptor.ORBInitInfo orbinfo,
                 FeatureInitInfo featureinfo)
Initialize method.
Parameters:
orbinfo -  
featureinfo -  

open

public void open()
Start listening for incoming connections. Idempotent.
Specified by:
open in interface TransportServerInitializer
Throws:
org.omg.CORBA.COMM_FAILURE - If unable to listen. This will result in server shutdown.
org.omg.CORBA.TRANSIENT - If unable to listen, and try again later.

getPrimaryEndpoint

public org.omg.IIOP.ListenPoint getPrimaryEndpoint()
Get the primary endpoint published in the IIOP profile.

getBiDirEndpoints

public org.omg.IIOP.ListenPoint[] getBiDirEndpoints()
Get the list of endpoints allowed for bidirectional use. These will be transmitted in BI_DIR_IIOP service contexts. If empty or null then bidirectional IIOP will be disabled.

getListenHost

protected java.net.InetAddress getListenHost()
Get the listen host.

close

public void close()
Stop listening for a connection. Idempotent.
Specified by:
close in interface TransportServerInitializer

isOpen

public boolean isOpen()
Is is the transport open?
Specified by:
isOpen in interface TransportServerInitializer

accept

public Transport accept(int timeout)
Listen for an incoming connection.
Specified by:
accept in interface TransportServerInitializer
Returns:
transport for new connection, or null if no connection received.
Throws:
org.omg.CORBA.COMM_FAILURE - If some permanent comms problem occours this will result in server shutdown.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

svrString

protected java.lang.String svrString()