org.jacorb.poa

Class POA

Implemented Interfaces:
Configurable, IDLEntity, LocalInterface, Object, POA, POAOperations, java.io.Serializable

public class POA
extends _POALocalBase
implements Configurable

The main POA class, an implementation of org.omg.PortableServer.POA

Version:
$Id: POA.java,v 1.48 2004/05/06 12:40:00 nicolas Exp $

Author:
Reimo Tiedemann, FU Berlin

Field Summary

protected BidirectionalPolicy
bidirectionalPolicy
protected IdAssignmentPolicy
idAssignmentPolicy
protected IdUniquenessPolicy
idUniquenessPolicy
protected ImplicitActivationPolicy
implicitActivationPolicy
protected LifespanPolicy
lifespanPolicy
protected RequestProcessingPolicy
requestProcessingPolicy
protected ServantRetentionPolicy
servantRetentionPolicy
protected ThreadPolicy
threadPolicy

Method Summary

static POA
_POA_init(ORB orb)
called from orb to obtain the RootPOA
void
_addPOAEventListener(EventListener listener)
Everybody who is interested in poa events can use this method to register an event listener.
POA
_getChildPOA(String adapter_name)
called from orb, returns a registered child poa, if no child poa exists a adapter activator will used to create a new poa unter this name
String
_getQualifiedName()
returns the complete poa name
void
_invoke(ServerRequest request)
called from orb for handing over a request
void
_removePOAEventListener(EventListener listener)
Unregister an event listener.
byte[]
activate_object(Servant servant)
void
activate_object_with_id(byte[] oid, Servant servant)
void
addLocalRequest()
protected void
addPOAListener(POAListener listener)
protected void
changeToActive()
protected void
changeToDiscarding()
protected void
changeToHolding()
protected void
changeToInactive(boolean etherealize_objects)
protected void
checkDestructionApparent()
protected static void
checkNotLocal(Object obj)
void
configure(Configuration myConfiguration)
POA
create_POA(String adapter_name, POAManager a_POAManager, Policy policies)
additionally raises an org.omg.CORBA.BAD_INV_ORDER exception if the poa goes shutdown and this method will called (not spec.)
IdAssignmentPolicy
create_id_assignment_policy(IdAssignmentPolicyValue value)
IdUniquenessPolicy
create_id_uniqueness_policy(IdUniquenessPolicyValue value)
ImplicitActivationPolicy
create_implicit_activation_policy(ImplicitActivationPolicyValue value)
LifespanPolicy
create_lifespan_policy(LifespanPolicyValue value)
Object
create_reference(String intf_rep_id)
The specified repository id, which may be a null string, will become the type_id of the generated object reference
Object
create_reference_with_id(byte[] oid, String intf_rep_id)
The specified repository id, which may be a null string, will become the type_id of the generated object reference
RequestProcessingPolicy
create_request_processing_policy(RequestProcessingPolicyValue value)
ServantRetentionPolicy
create_servant_retention_policy(ServantRetentionPolicyValue value)
ThreadPolicy
create_thread_policy(ThreadPolicyValue value)
void
deactivate_object(byte[] oid)
The operation does not wait for requests or etherealization to complete and always returns immediately (after deactivating the oid?)
void
destroy(boolean etherealize_objects, boolean wait_for_completion)
POA
find_POA(String adapter_name, boolean activate_it)
If the intended child poa is not found and activate_it is TRUE, it is possible for another thread to create the same poa with create_POA at the same time in a race condition.
protected POAMonitor
getMonitor()
int
getNumberOfObjects()
protected ORB
getORB()
byte[]
getPOAId()
Policy
getPolicy(int type)
protected Object
getReference(byte[] oid, String intf_rep_id, boolean cache)
protected RequestController
getRequestController()
protected State
getState()
Servant
get_servant()
ServantManager
get_servant_manager()
Object
id_to_reference(byte[] oid)
Servant
id_to_servant(byte[] oid)
protected boolean
isActive()
protected boolean
isDestructionApparent()
protected boolean
isDestructionComplete()
protected boolean
isDiscarding()
protected boolean
isHolding()
protected boolean
isImplicitActivation()
protected boolean
isInactive()
protected boolean
isMultipleId()
boolean
isPersistent()
boolean
isRetain()
also called from Delegate
protected boolean
isShutdownInProgress()
protected boolean
isSingleThreadModel()
boolean
isSystemId()
protected boolean
isUniqueId()
protected boolean
isUseDefaultServant()
boolean
isUseServantManager()
boolean
previouslyGeneratedObjectId(byte[] oid)
boolean
previouslyGeneratedObjectKey(byte[] object_key)
byte[]
reference_to_id(Object reference)
Servant
reference_to_servant(Object reference)
void
removeLocalRequest()
protected void
removePOAListener(POAListener listener)
byte[]
servant_to_id(Servant servant)
Object
servant_to_reference(Servant servant)
protected void
setMonitor(POAMonitor _monitor)
void
set_servant(Servant _defaultServant)
void
set_servant_manager(ServantManager servant_manager)
this method makes a additional check: if the POA has the RETAIN policy and _servantManager is not a instance of ServantActivator or if the POA has the NON_RETAIN policy and _servantManager is not a instance of ServantLocator this method raises also the WrongPolicy Exception (not spec.)
POAManager
the_POAManager()
AdapterActivator
the_activator()
it is system-dependent whether the root POA initially has an adapter activator. a newly created POA has not an adapter activator (null)
void
the_activator(AdapterActivator adapter_activator)
POA[]
the_children()
String
the_name()
POA
the_parent()
protected void
unregisterChild(String name)
notified the completion of a child destruction
boolean
useDefaultServant()
called from Delegate
protected boolean
useServantManager()

Methods inherited from class org.omg.PortableServer._POALocalBase

_ids

Methods inherited from class org.omg.CORBA.LocalObject

_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _get_interface_def, _get_policy, _hash, _ids, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection

Field Details

bidirectionalPolicy

protected BidirectionalPolicy bidirectionalPolicy


idAssignmentPolicy

protected IdAssignmentPolicy idAssignmentPolicy


idUniquenessPolicy

protected IdUniquenessPolicy idUniquenessPolicy


implicitActivationPolicy

protected ImplicitActivationPolicy implicitActivationPolicy


lifespanPolicy

protected LifespanPolicy lifespanPolicy


requestProcessingPolicy

protected RequestProcessingPolicy requestProcessingPolicy


servantRetentionPolicy

protected ServantRetentionPolicy servantRetentionPolicy


threadPolicy

protected ThreadPolicy threadPolicy

Method Details

_POA_init

public static POA _POA_init(ORB orb)
called from orb to obtain the RootPOA


_addPOAEventListener

public void _addPOAEventListener(EventListener listener)
Everybody who is interested in poa events can use this method to register an event listener. The poa will pass the register calls to the right components


_getChildPOA

public POA _getChildPOA(String adapter_name)
            throws ParentIsHolding
called from orb, returns a registered child poa, if no child poa exists a adapter activator will used to create a new poa unter this name


_getQualifiedName

public String _getQualifiedName()
returns the complete poa name


_invoke

public void _invoke(ServerRequest request)
            throws WrongAdapter
called from orb for handing over a request


_removePOAEventListener

public void _removePOAEventListener(EventListener listener)
Unregister an event listener. The poa will pass the unregister calls to the right components


activate_object

public byte[] activate_object(Servant servant)
            throws ServantAlreadyActive,
                   WrongPolicy
Specified by:
activate_object in interface POAOperations


activate_object_with_id

public void activate_object_with_id(byte[] oid,
                                    Servant servant)
            throws ServantAlreadyActive,
                   ObjectAlreadyActive,
                   WrongPolicy
Specified by:
activate_object_with_id in interface POAOperations


addLocalRequest

public void addLocalRequest()


addPOAListener

protected void addPOAListener(POAListener listener)


changeToActive

protected void changeToActive()


changeToDiscarding

protected void changeToDiscarding()


changeToHolding

protected void changeToHolding()


changeToInactive

protected void changeToInactive(boolean etherealize_objects)


checkDestructionApparent

protected void checkDestructionApparent()


checkNotLocal

protected static void checkNotLocal(Object obj)
            throws WrongAdapter


configure

public void configure(Configuration myConfiguration)
            throws ConfigurationException


create_POA

public POA create_POA(String adapter_name,
                      POAManager a_POAManager,
                      Policy policies)
            throws AdapterAlreadyExists,
                   InvalidPolicy
additionally raises an org.omg.CORBA.BAD_INV_ORDER exception if the poa goes shutdown and this method will called (not spec.)


create_id_assignment_policy

public IdAssignmentPolicy create_id_assignment_policy(IdAssignmentPolicyValue value)
Specified by:
create_id_assignment_policy in interface POAOperations


create_id_uniqueness_policy

public IdUniquenessPolicy create_id_uniqueness_policy(IdUniquenessPolicyValue value)
Specified by:
create_id_uniqueness_policy in interface POAOperations


create_implicit_activation_policy

public ImplicitActivationPolicy create_implicit_activation_policy(ImplicitActivationPolicyValue value)
Specified by:
create_implicit_activation_policy in interface POAOperations


create_lifespan_policy

public LifespanPolicy create_lifespan_policy(LifespanPolicyValue value)
Specified by:
create_lifespan_policy in interface POAOperations


create_reference

public Object create_reference(String intf_rep_id)
            throws WrongPolicy
The specified repository id, which may be a null string, will become the type_id of the generated object reference


create_reference_with_id

public Object create_reference_with_id(byte[] oid,
                                       String intf_rep_id)
            throws WrongPolicy
The specified repository id, which may be a null string, will become the type_id of the generated object reference


create_request_processing_policy

public RequestProcessingPolicy create_request_processing_policy(RequestProcessingPolicyValue value)
Specified by:
create_request_processing_policy in interface POAOperations


create_servant_retention_policy

public ServantRetentionPolicy create_servant_retention_policy(ServantRetentionPolicyValue value)
Specified by:
create_servant_retention_policy in interface POAOperations


create_thread_policy

public ThreadPolicy create_thread_policy(ThreadPolicyValue value)
Specified by:
create_thread_policy in interface POAOperations


deactivate_object

public void deactivate_object(byte[] oid)
            throws ObjectNotActive,
                   WrongPolicy
The operation does not wait for requests or etherealization to complete and always returns immediately (after deactivating the oid?)
Specified by:
deactivate_object in interface POAOperations


destroy

public void destroy(boolean etherealize_objects,
                    boolean wait_for_completion)
Specified by:
destroy in interface POAOperations


find_POA

public POA find_POA(String adapter_name,
                    boolean activate_it)
            throws AdapterNonExistent
If the intended child poa is not found and activate_it is TRUE, it is possible for another thread to create the same poa with create_POA at the same time in a race condition. Applications should be prepared to deal with failures from the manual (create_POA) or automatic (findPOA or unknown_adapter from AdapterActivator) POA creation. Another possible situation is that the poa returned goes shutdown but the orb will notice this situation if he will proceed with request processing.


getMonitor

protected POAMonitor getMonitor()


getNumberOfObjects

public int getNumberOfObjects()


getORB

protected ORB getORB()


getPOAId

public byte[] getPOAId()


getPolicy

public Policy getPolicy(int type)


getReference

protected Object getReference(byte[] oid,
                              String intf_rep_id,
                              boolean cache)


getRequestController

protected RequestController getRequestController()


getState

protected State getState()


get_servant

public Servant get_servant()
            throws NoServant,
                   WrongPolicy
Specified by:
get_servant in interface POAOperations


get_servant_manager

public ServantManager get_servant_manager()
            throws WrongPolicy
Specified by:
get_servant_manager in interface POAOperations


id_to_reference

public Object id_to_reference(byte[] oid)
            throws ObjectNotActive,
                   WrongPolicy
Specified by:
id_to_reference in interface POAOperations


id_to_servant

public Servant id_to_servant(byte[] oid)
            throws ObjectNotActive,
                   WrongPolicy
Specified by:
id_to_servant in interface POAOperations


isActive

protected boolean isActive()


isDestructionApparent

protected boolean isDestructionApparent()


isDestructionComplete

protected boolean isDestructionComplete()


isDiscarding

protected boolean isDiscarding()


isHolding

protected boolean isHolding()


isImplicitActivation

protected boolean isImplicitActivation()


isInactive

protected boolean isInactive()


isMultipleId

protected boolean isMultipleId()


isPersistent

public boolean isPersistent()


isRetain

public boolean isRetain()
also called from Delegate


isShutdownInProgress

protected boolean isShutdownInProgress()


isSingleThreadModel

protected boolean isSingleThreadModel()


isSystemId

public boolean isSystemId()


isUniqueId

protected boolean isUniqueId()


isUseDefaultServant

protected boolean isUseDefaultServant()


isUseServantManager

public boolean isUseServantManager()


previouslyGeneratedObjectId

public boolean previouslyGeneratedObjectId(byte[] oid)


previouslyGeneratedObjectKey

public boolean previouslyGeneratedObjectKey(byte[] object_key)


reference_to_id

public byte[] reference_to_id(Object reference)
            throws WrongAdapter,
                   WrongPolicy
Specified by:
reference_to_id in interface POAOperations


reference_to_servant

public Servant reference_to_servant(Object reference)
            throws ObjectNotActive,
                   WrongAdapter,
                   WrongPolicy
Specified by:
reference_to_servant in interface POAOperations


removeLocalRequest

public void removeLocalRequest()


removePOAListener

protected void removePOAListener(POAListener listener)


servant_to_id

public byte[] servant_to_id(Servant servant)
            throws ServantNotActive,
                   WrongPolicy
Specified by:
servant_to_id in interface POAOperations


servant_to_reference

public Object servant_to_reference(Servant servant)
            throws ServantNotActive,
                   WrongPolicy
Specified by:
servant_to_reference in interface POAOperations


setMonitor

protected void setMonitor(POAMonitor _monitor)


set_servant

public void set_servant(Servant _defaultServant)
            throws WrongPolicy
Specified by:
set_servant in interface POAOperations


set_servant_manager

public void set_servant_manager(ServantManager servant_manager)
            throws WrongPolicy
this method makes a additional check: if the POA has the RETAIN policy and _servantManager is not a instance of ServantActivator or if the POA has the NON_RETAIN policy and _servantManager is not a instance of ServantLocator this method raises also the WrongPolicy Exception (not spec.)
Specified by:
set_servant_manager in interface POAOperations


the_POAManager

public POAManager the_POAManager()
Specified by:
the_POAManager in interface POAOperations


the_activator

public AdapterActivator the_activator()
it is system-dependent whether the root POA initially has an adapter activator. a newly created POA has not an adapter activator (null)
Specified by:
the_activator in interface POAOperations


the_activator

public void the_activator(AdapterActivator adapter_activator)
Specified by:
the_activator in interface POAOperations


the_children

public POA[] the_children()
Specified by:
the_children in interface POAOperations


the_name

public String the_name()
Specified by:
the_name in interface POAOperations


the_parent

public POA the_parent()
Specified by:
the_parent in interface POAOperations


unregisterChild

protected void unregisterChild(String name)
notified the completion of a child destruction


useDefaultServant

public boolean useDefaultServant()
called from Delegate


useServantManager

protected boolean useServantManager()