org.apache.geronimo.corba
Class CORBABean

java.lang.Object
  extended by org.apache.geronimo.corba.CORBABean
All Implemented Interfaces:
ORBConfiguration, ORBRef, GBeanLifecycle

public class CORBABean
extends Object
implements GBeanLifecycle, ORBRef, ORBConfiguration

A CORBABean is a main CORBA server configuration. The CORBABean is the hosting ORB to which additional TSSBeans attach to export EJBs. The CORBABean may be configured to use either plain socket listeners or SSL listeners, based on the bean specification. All TSSBean objects attached to this Bean instance will share the same listener endpoint and transport-level security.


Constructor Summary
CORBABean()
           
CORBABean(AbstractName abstractName, ConfigAdapter configAdapter, String host, int listenerPort, ClassLoader classLoader, NameService nameService, OpenEjbSystem ejbSystem, SSLConfig ssl)
          Instantiate a CORBABean instance.
 
Method Summary
 Policy[] addPolicyOverrides(Policy[] policies)
          Add the policy overrides (if any) to the list of policies used to create a POA instance.
 void doFail()
          Fails the GBean.
 void doStart()
          Start the ORB associated with this bean instance.
 void doStop()
          Stops the target.
 HandleDelegate getHandleDelegate()
           
 String getHost()
          Get the configuration host name.
 InetSocketAddress getListenAddress()
          Retrieve the listener address (host/port combo) used by the ORB.
 NameService getNameService()
          Retrieve the NameService this CORBA server depends upon.
 ORB getORB()
          Return the ORB instance created for this CORBABean.
 int getPort()
          Get the configured listener port.
 POA getRootPOA()
          Get the root POA() instance associated with the ORB.
 SSLConfig getSslConfig()
          Return the SSLConfig used for this ORB instance.
 TSSConfig getTssConfig()
          Get the optional TSSConfig object specified for this CORBABean server.
 String getURI()
          Return the retrieval URI for this bean.
 void setNameService(NameService s)
          Setter attribute for the NameService.
 void setPolicyOverrides(Policy[] overrides)
          Set a set of policy overrides to be used with this ORB instance.
 void setSslConfing(SSLConfig c)
          Attribute setter for the SSL configuration.
 void setTssConfig(TSSConfig config)
          Set a TSSConfig value for this CORBA instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CORBABean

public CORBABean()

CORBABean

public CORBABean(AbstractName abstractName,
                 ConfigAdapter configAdapter,
                 String host,
                 int listenerPort,
                 ClassLoader classLoader,
                 NameService nameService,
                 OpenEjbSystem ejbSystem,
                 SSLConfig ssl)
Instantiate a CORBABean instance.

Parameters:
abstractName - The server-created abstract name for this bean instance.
configAdapter - The ORB ConfigAdapter used to interface with the JVM-configured ORB instance.
host - The hostname we publish ourselves under.
listenerPort - The initial listener port to use.
classLoader - The ClassLoader used for ORB context class loading.
nameService - The initial name service the created ORB will use for object resolution.
ssl - The SSL configuration, including the KeystoreManager.
Method Detail

getNameService

public NameService getNameService()
Retrieve the NameService this CORBA server depends upon.

Returns:
The configured NameService instance.

setNameService

public void setNameService(NameService s)
Setter attribute for the NameService.

Parameters:
s - The new target name service.

getTssConfig

public TSSConfig getTssConfig()
Get the optional TSSConfig object specified for this CORBABean server.

Specified by:
getTssConfig in interface ORBConfiguration
Returns:
The TSSConfig object (if any).

setTssConfig

public void setTssConfig(TSSConfig config)
Set a TSSConfig value for this CORBA instance.

Parameters:
config - The required TSSConfig information.

getSslConfig

public SSLConfig getSslConfig()
Return the SSLConfig used for this ORB instance. if one has not been configured, this returns a default configuration.

Specified by:
getSslConfig in interface ORBConfiguration
Returns:
The SSLConfig object use to manage transport-level security.

setSslConfing

public void setSslConfing(SSLConfig c)
Attribute setter for the SSL configuration.

Parameters:
c - The new SSLConfig object used for secure communications.

getORB

public ORB getORB()
Return the ORB instance created for this CORBABean.

Specified by:
getORB in interface ORBRef
Returns:
The ORB instance backing this bean.

getHandleDelegate

public HandleDelegate getHandleDelegate()

getRootPOA

public POA getRootPOA()
Get the root POA() instance associated with the ORB.

Returns:
The rootPOA instance obtained from the ORB.

getListenAddress

public InetSocketAddress getListenAddress()
Retrieve the listener address (host/port combo) used by the ORB.

Returns:
An InetSocketAddress item identifying the end point for the ORB.

doStart

public void doStart()
             throws Exception
Start the ORB associated with this bean instance.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

getURI

public String getURI()
Return the retrieval URI for this bean.

Returns:
The URI for the bean AbstractName;

getPort

public int getPort()
Get the configured listener port.

Returns:
The configeration port value.

getHost

public String getHost()
Get the configuration host name.

Returns:
The configuration host name. The default is "localhost".

setPolicyOverrides

public void setPolicyOverrides(Policy[] overrides)
Set a set of policy overrides to be used with this ORB instance. These are normally set by the ORBConfigAdapter instance when the ORB is created.

Parameters:
overrides - The new override list.

addPolicyOverrides

public Policy[] addPolicyOverrides(Policy[] policies)
Add the policy overrides (if any) to the list of policies used to create a POA instance.

Parameters:
policies - The base set of policies.
Returns:
A new Policy array with the overrides added. Returns the same array if no overrides are required.


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.