org.openorb.orb.csiv2
Class CSITransportServerInitializer

java.lang.Object
  extended by IIOPTransportServerInitializer
      extended by org.openorb.orb.csiv2.CSITransportServerInitializer

public class CSITransportServerInitializer
extends IIOPTransportServerInitializer

An initializer that is used for establishing server side endpoints based on configuration options.

Author:
Michael Rumpf

Constructor Summary
CSITransportServerInitializer()
          Default constructor.
 
Method Summary
 Transport accept(int timeout)
          Listen for an incoming connection.
 void close()
          Stop listening for a connection.
 ListenPoint[] getBiDirEndpoints()
          Get the list of endpoints allowed for bidirectional use.
 java.lang.String getName()
          Return the name of the initializer: csiv2-server-init.
 void init(org.omg.PortableInterceptor.ORBInitInfo orbinfo, FeatureInitInfo featureinfo)
          Initialize the server side transport.
 boolean isOpen()
          Checks whether the transport is open or not.
 void open()
          Start listening for incoming connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSITransportServerInitializer

public CSITransportServerInitializer()
Default constructor.

Method Detail

getName

public java.lang.String getName()
Return the name of the initializer: csiv2-server-init.

Returns:
The name of the intializer.

init

public void init(org.omg.PortableInterceptor.ORBInitInfo orbinfo,
                 FeatureInitInfo featureinfo)
Initialize the server side transport.

Parameters:
orbinfo - The ORB init info.
featureinfo - The ORB features.

open

public void open()
Start listening for incoming connections. Idempotent.

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.

getBiDirEndpoints

public 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.

Returns:
An array of enpoints.

close

public void close()
Stop listening for a connection. Idempotent.


isOpen

public boolean isOpen()
Checks whether the transport is open or not.

Returns:
True when the transport is open, false otherwise.

accept

public Transport accept(int timeout)
Listen for an incoming connection.

Parameters:
timeout - The timeout value how long to wait for connections.
Returns:
transport for new connection, or null if no connection recieved.
Throws:
org.omg.CORBA.COMM_FAILURE - If some permanent comms problem occours this will result in server shutdown.