com.iona.corbautil
Class PoaUtilityPortableImpl

java.lang.Object
  |
  +--com.iona.corbautil.PoaUtility
        |
        +--com.iona.corbautil.PoaUtilityPortableImpl
Direct Known Subclasses:
PoaUtilityOrbacusImpl, PoaUtilityOrbixImpl

public class PoaUtilityPortableImpl
extends PoaUtility

A class that simplifies the construction of POA hierarchies. An instance of this class is created by calling PoaUtility.init(), subject to system properties having appropriate values.


Field Summary
protected  org.omg.CORBA.ORB m_orb
          The ORB to which the created POAs belong.
 
Fields inherited from class com.iona.corbautil.PoaUtility
FIXED_PORTS_NO_IMR, FIXED_PORTS_WITH_IMR, RANDOM_PORTS_NO_IMR, RANDOM_PORTS_WITH_IMR
 
Constructor Summary
PoaUtilityPortableImpl(org.omg.CORBA.ORB orb, int deployModel)
          This constructor is not intended to be called by "normal" user code.
 
Method Summary
 org.omg.PortableServer.POA createPoa(java.lang.String poaName, org.omg.PortableServer.POA parentPoa, com.iona.corbautil.LabelledPOAManager labelledMgr, java.lang.String policiesStr)
          Create a POA.
 com.iona.corbautil.LabelledPOAManager createPoaManager(java.lang.String label)
          Create a POA Manager.
protected  org.omg.CORBA.Policy createPolicy(java.lang.String name, java.lang.String policy_list_str)
          Create a Policy object from the stringified name
protected  int deployModel()
          Accessor method.
protected  boolean firstPoaMgr()
          Accessor method.
protected  void firstPoaMgr(boolean val)
          Modifier method for changing the value returned by firstPoaMgr().
 org.omg.CORBA.ORB orb()
          Accessor for the ORB.
 org.omg.PortableServer.POA root()
          Accessor for the root POA.
 
Methods inherited from class com.iona.corbautil.PoaUtility
init, stringToDeploymentModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_orb

protected org.omg.CORBA.ORB m_orb
The ORB to which the created POAs belong.

Constructor Detail

PoaUtilityPortableImpl

public PoaUtilityPortableImpl(org.omg.CORBA.ORB orb,
                              int deployModel)
                       throws PoaUtilityException
This constructor is not intended to be called by "normal" user code. Instead, it is called by PoaUtility.init(), subject to system properties.

Parameters:
orb - The ORB.
Method Detail

createPoa

public org.omg.PortableServer.POA createPoa(java.lang.String poaName,
                                            org.omg.PortableServer.POA parentPoa,
                                            com.iona.corbautil.LabelledPOAManager labelledMgr,
                                            java.lang.String policiesStr)
                                     throws PoaUtilityException
Create a POA.

Specified by:
createPoa in class PoaUtility
Parameters:
poaName - Name of the POA being created
parentPoa - The parent POA
labelledMgr - The (labelled) POA Manager (previously created by calling createPoaManager()
policiesStr - A string that lists the policies to be used for the POA, for example, "persistent + user_id + retain". Individual policies are spelt just as in the CORBA specification, except that they are in lowercase. Any combination of spaces, commas and/or plus-signs can be used as separators between policy names.
Returns:
The newly created POA.
PoaUtilityException

createPolicy

protected org.omg.CORBA.Policy createPolicy(java.lang.String name,
                                            java.lang.String policy_list_str)
                                     throws PoaUtilityException
Create a Policy object from the stringified name

Parameters:
name - The name of a policy, for example, "persistent", "user_id" or "retain". The name of an individual policy is identical to the spelling used in the CORBA specification execept that it is in lower-case.
Returns:
The created Policy object.
PoaUtilityException

createPoaManager

public com.iona.corbautil.LabelledPOAManager createPoaManager(java.lang.String label)
                                                       throws PoaUtilityException
Create a POA Manager.

Specified by:
createPoaManager in class PoaUtility
Parameters:
label - A label (name) that is to be associated with the newly created POA Manager. The first time this method is called, it returns the root POA. Subsequent calls cause it to create a new POA Manager.
Returns:
The newly created POA manager.
PoaUtilityException

root

public org.omg.PortableServer.POA root()
Accessor for the root POA.

Specified by:
root in class PoaUtility
Returns:
The root POA.

orb

public org.omg.CORBA.ORB orb()
Accessor for the ORB.

Returns:
The ORB.

firstPoaMgr

protected boolean firstPoaMgr()
Accessor method. Returns true prior to the first call of createPoaManager(). After the first call of createPoaManager(), this method returns false.


deployModel

protected int deployModel()
Accessor method.


firstPoaMgr

protected void firstPoaMgr(boolean val)
Modifier method for changing the value returned by firstPoaMgr().

Parameters:
val - The new value (true or false)