org.openorb.orb.ssl
Class SSLTransportServerInitializer

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.openorb.orb.iiop.IIOPTransportServerInitializer
          extended by org.openorb.orb.ssl.SSLTransportServerInitializer
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, org.openorb.orb.Initializer, org.openorb.orb.net.TransportServerInitializer

public class SSLTransportServerInitializer
extends org.openorb.orb.iiop.IIOPTransportServerInitializer

Interface for creating sockets.

Author:
Chris Wood

Constructor Summary
SSLTransportServerInitializer()
          Default constructor.
 
Method Summary
 org.openorb.orb.net.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.
 java.lang.String getName()
          Return the name of the initializer.
 void init(org.omg.PortableInterceptor.ORBInitInfo orbinfo, org.openorb.orb.pi.FeatureInitInfo featureinfo)
          Initalize the server side.
 boolean isOpen()
          Checks whether the transport is open or not.
 void open()
          Start listening for incoming connections.
 java.lang.String toString()
          Return an info string.
 
Methods inherited from class org.openorb.orb.iiop.IIOPTransportServerInitializer
getListenHost, getPrimaryEndpoint, svrString
 
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

SSLTransportServerInitializer

public SSLTransportServerInitializer()
Default constructor.

Method Detail

getName

public java.lang.String getName()
Return the name of the initializer.

Specified by:
getName in interface org.openorb.orb.Initializer
Overrides:
getName in class org.openorb.orb.iiop.IIOPTransportServerInitializer
Returns:
The initializer name: ssl-server-init.

init

public void init(org.omg.PortableInterceptor.ORBInitInfo orbinfo,
                 org.openorb.orb.pi.FeatureInitInfo featureinfo)
Initalize the server side.

Overrides:
init in class org.openorb.orb.iiop.IIOPTransportServerInitializer
Parameters:
orbinfo - The ORB init info.
featureinfo - The ORB features.

open

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

Specified by:
open in interface org.openorb.orb.net.TransportServerInitializer
Overrides:
open in class org.openorb.orb.iiop.IIOPTransportServerInitializer
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 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.

Overrides:
getBiDirEndpoints in class org.openorb.orb.iiop.IIOPTransportServerInitializer
Returns:
An array of enpoints.

close

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

Specified by:
close in interface org.openorb.orb.net.TransportServerInitializer
Overrides:
close in class org.openorb.orb.iiop.IIOPTransportServerInitializer

isOpen

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

Specified by:
isOpen in interface org.openorb.orb.net.TransportServerInitializer
Overrides:
isOpen in class org.openorb.orb.iiop.IIOPTransportServerInitializer
Returns:
True when the transport is open, false otherwise.

accept

public org.openorb.orb.net.Transport accept(int timeout)
Listen for an incoming connection.

Specified by:
accept in interface org.openorb.orb.net.TransportServerInitializer
Overrides:
accept in class org.openorb.orb.iiop.IIOPTransportServerInitializer
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.

toString

public java.lang.String toString()
Return an info string.

Overrides:
toString in class org.openorb.orb.iiop.IIOPTransportServerInitializer
Returns:
A string explaining the operational mode.