public class POAImpl extends ObjectAdapterBase implements POA
Modifier and Type | Field and Description |
---|---|
protected ThreadLocal |
isDestroying |
Modifier and Type | Method and Description |
---|---|
void |
activate_object_with_id(byte[] id,
Servant servant)
activate_object_with_id
Section 3.3.8.15 |
byte[] |
activate_object(Servant servant)
activate_object
Section 3.3.8.14 |
IdAssignmentPolicy |
create_id_assignment_policy(IdAssignmentPolicyValue value)
create_id_assignment_policy
Section 3.3.8.5 |
IdUniquenessPolicy |
create_id_uniqueness_policy(IdUniquenessPolicyValue value)
create_id_uniqueness_policy
Section 3.3.8.5 |
ImplicitActivationPolicy |
create_implicit_activation_policy(ImplicitActivationPolicyValue value)
create_implicit_activation_policy
Section 3.3.8.5 |
LifespanPolicy |
create_lifespan_policy(LifespanPolicyValue value)
create_lifespan_policy
Section 3.3.8.5 |
POA |
create_POA(String name,
POAManager theManager,
Policy[] policies)
create_POA
Section 3.3.8.2 |
Object |
create_reference_with_id(byte[] oid,
String repId)
create_reference_with_id
3.3.8.18 |
Object |
create_reference(String repId)
create_reference
3.3.8.17 |
RequestProcessingPolicy |
create_request_processing_policy(RequestProcessingPolicyValue value)
create_request_processing_policy
Section 3.3.8.5 |
ServantRetentionPolicy |
create_servant_retention_policy(ServantRetentionPolicyValue value)
create_servant_retention_policy
Section 3.3.8.5 |
ThreadPolicy |
create_thread_policy(ThreadPolicyValue value)
create_thread_policy
Section 3.3.8.5 |
void |
deactivate_object(byte[] id)
deactivate_object
3.3.8.16 |
void |
destroy(boolean etherealize,
boolean wait_for_completion)
destroy
Section 3.3.8.4 |
void |
enter()
enter must be called before each request is invoked on a servant.
|
void |
exit()
exit must be called after each request has been completed.
|
POA |
find_POA(String name,
boolean activate)
find_POA
Section 3.3.8.3 |
ServantManager |
get_servant_manager()
get_servant_manager
Section 3.3.8.10 |
Servant |
get_servant()
get_servant
Section 3.3.8.12 |
Policy |
getEffectivePolicy(int type) |
String[] |
getInterfaces(Object servant,
byte[] objectId)
Return the most derived interface for the given servant and objectId.
|
void |
getInvocationServant(OAInvocationInfo info)
Get the servant for the request given by the parameters.
|
Object |
getLocalServant(byte[] objectId)
Get the servant corresponding to the given objectId, if this is supported.
|
int |
getManagerId()
Return the ID of the AdapterManager for this object adapter.
|
protected ObjectCopierFactory |
getObjectCopierFactory() |
short |
getState()
Return the current state of this object adapter (see
org.omg.PortableInterceptors for states.
|
Object |
id_to_reference(byte[] id)
id_to_reference
3.3.8.24 |
Servant |
id_to_servant(byte[] id)
id_to_servant
3.3.8.23 |
byte[] |
id()
id
11.3.8.26 in ptc/00-08-06 |
byte[] |
reference_to_id(Object reference)
reference_to_id
3.3.8.22 |
Servant |
reference_to_servant(Object reference)
reference_to_servant
3.3.8.21 |
void |
returnServant()
Called from the subcontract to let this POA cleanup after an
invocation.
|
byte[] |
servant_to_id(Servant servant)
servant_to_id
3.3.8.19 |
Object |
servant_to_reference(Servant servant)
servant_to_reference
3.3.8.20 |
void |
set_servant_manager(ServantManager servantManager)
set_servant_manager
Section 3.3.8.10 |
void |
set_servant(Servant defaultServant)
set_servant
Section 3.3.8.13 |
AdapterActivator |
the_activator()
the_activator
Section 3.3.8.9 |
void |
the_activator(AdapterActivator activator)
the_activator
Section 3.3.8.9 |
POA[] |
the_children()
the_children |
String |
the_name()
the_name
Section 3.3.8.6 |
POA |
the_parent()
the_parent
Section 3.3.8.7 |
POAManager |
the_POAManager()
the_POAManager
Section 3.3.8.8 |
String |
toString() |
getAdapterId, getAdapterTemplate, getCurrentFactory, getIORTemplate, getORB, initializeTemplate, invocationWrapper, iorWrapper, lifecycleWrapper, makeInvocationInfo, makeObject, omgInvocationWrapper, omgLifecycleWrapper, setCurrentFactory
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
protected ThreadLocal isDestroying
public POA create_POA(String name, POAManager theManager, Policy[] policies) throws AdapterAlreadyExists, InvalidPolicy
create_POA
Section 3.3.8.2create_POA
in interface POAOperations
name
- identifies the new POA with
respect to other POAs with the same parent POA.theManager
- specifies the POA Manager to be
associated with the new POA.policies
- specifies policy objects to be
associated with the POA to control its behavior.AdapterAlreadyExists
- specifies that the
target POA already has a child POA with
the specified name.InvalidPolicy
- is raised if any of the
policy objects are not valid for the ORB,
or are in conflict, or require an
administrative action that has not been
performed.public POA find_POA(String name, boolean activate) throws AdapterNonExistent
find_POA
Section 3.3.8.3find_POA
in interface POAOperations
name
- POA name to be found.activate
- if a POA with the specified
name does not exist and the value of
the activate_it parameter is TRUE, the target
POA's AdapterActivator, if one exists,
is invoked.AdapterNonExistent
public void destroy(boolean etherealize, boolean wait_for_completion)
destroy
Section 3.3.8.4destroy
in interface POAOperations
etherealize
- flag to indicate whether
etherealize operation on servant manager needs
to be called.wait_for_completion
- flag to indicate whether
POA and its children need to wait for active
requests and the etherealization to complete.public ThreadPolicy create_thread_policy(ThreadPolicyValue value)
create_thread_policy
Section 3.3.8.5create_thread_policy
in interface POAOperations
value
- policy typepublic LifespanPolicy create_lifespan_policy(LifespanPolicyValue value)
create_lifespan_policy
Section 3.3.8.5create_lifespan_policy
in interface POAOperations
value
- policy typepublic IdUniquenessPolicy create_id_uniqueness_policy(IdUniquenessPolicyValue value)
create_id_uniqueness_policy
Section 3.3.8.5create_id_uniqueness_policy
in interface POAOperations
value
- policy typepublic IdAssignmentPolicy create_id_assignment_policy(IdAssignmentPolicyValue value)
create_id_assignment_policy
Section 3.3.8.5create_id_assignment_policy
in interface POAOperations
value
- policy typepublic ImplicitActivationPolicy create_implicit_activation_policy(ImplicitActivationPolicyValue value)
create_implicit_activation_policy
Section 3.3.8.5create_implicit_activation_policy
in interface POAOperations
value
- policy typepublic ServantRetentionPolicy create_servant_retention_policy(ServantRetentionPolicyValue value)
create_servant_retention_policy
Section 3.3.8.5create_servant_retention_policy
in interface POAOperations
value
- policy typepublic RequestProcessingPolicy create_request_processing_policy(RequestProcessingPolicyValue value)
create_request_processing_policy
Section 3.3.8.5create_request_processing_policy
in interface POAOperations
value
- policy typepublic String the_name()
the_name
Section 3.3.8.6the_name
in interface POAOperations
public POA the_parent()
the_parent
Section 3.3.8.7the_parent
in interface POAOperations
public POA[] the_children()
the_children
the_children
in interface POAOperations
public POAManager the_POAManager()
the_POAManager
Section 3.3.8.8the_POAManager
in interface POAOperations
public AdapterActivator the_activator()
the_activator
Section 3.3.8.9the_activator
in interface POAOperations
public void the_activator(AdapterActivator activator)
the_activator
Section 3.3.8.9the_activator
in interface POAOperations
public ServantManager get_servant_manager() throws WrongPolicy
get_servant_manager
Section 3.3.8.10get_servant_manager
in interface POAOperations
WrongPolicy
- raised if the
USE_SERVANT_MANAGER policy is not specified.public void set_servant_manager(ServantManager servantManager) throws WrongPolicy
set_servant_manager
Section 3.3.8.10set_servant_manager
in interface POAOperations
servantManager
- servant manager to be used as a default.WrongPolicy
- raised if the
USE_SERVANT_MANAGER policy is not specified.public Servant get_servant() throws NoServant, WrongPolicy
get_servant
Section 3.3.8.12get_servant
in interface POAOperations
NoServant
- raised if no default servant is
associated with the POA.WrongPolicy
- raised if the
USE_DEFAULT_SERVANT policy is not specified.public void set_servant(Servant defaultServant) throws WrongPolicy
set_servant
Section 3.3.8.13set_servant
in interface POAOperations
defaultServant
- servant to be used as a default.WrongPolicy
- raised if the
USE_DEFAULT_SERVANT policy is not specified.public byte[] activate_object(Servant servant) throws ServantAlreadyActive, WrongPolicy
activate_object
Section 3.3.8.14activate_object
in interface POAOperations
servant
- servant to be associated with an
object to be activated.ServantAlreadyActive
- is raised if the
POA has UNIQUE_ID policy and servant is
is already in the Active Object Map.WrongPolicy
- raised if the SYSTEM_ID and
RETAIN policies are not specified.public void activate_object_with_id(byte[] id, Servant servant) throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy
activate_object_with_id
Section 3.3.8.15activate_object_with_id
in interface POAOperations
id
- object id for the object to be activated.servant
- servant to be associated with the
object.ObjectAlreadyActive
- raised if the object is
already active in the POA.ServantAlreadyActive
- raised if the POA
has the UNIQUE_ID policy and the servant
is already in the Active Object Map.WrongPolicy
- raised if the RETAIN policy is
is not specified.public void deactivate_object(byte[] id) throws ObjectNotActive, WrongPolicy
deactivate_object
3.3.8.16deactivate_object
in interface POAOperations
id
- Object Id for the object to be deactivated.ObjectNotActive
- if the object with the
specified oid is not in the Active Object
Map.WrongPolicy
- raised if the RETAIN policy is
is not specified.public Object create_reference(String repId) throws WrongPolicy
create_reference
3.3.8.17create_reference
in interface POAOperations
repId
- rep id for creating an object reference.WrongPolicy
- if SYSTEM_ID policy is not
specified.public Object create_reference_with_id(byte[] oid, String repId)
create_reference_with_id
3.3.8.18create_reference_with_id
in interface POAOperations
oid
- object id for creating an objrefrepId
- rep id for creating an objrefpublic byte[] servant_to_id(Servant servant) throws ServantNotActive, WrongPolicy
servant_to_id
3.3.8.19servant_to_id
in interface POAOperations
servant
- servant for which the object disi returned.ServantNotActive
- if the above rules and
policy combination is not met.WrongPolicy
- if the USE_DEFAULT_SERVANT policy
or a combination of the RETAIN policy and
either the UNIQUE_ID or IMPLICIT_ACTIVATION
policies are not present.public Object servant_to_reference(Servant servant) throws ServantNotActive, WrongPolicy
servant_to_reference
3.3.8.20servant_to_reference
in interface POAOperations
servant
- servant for which the object reference
needs to be obtained.ServantNotActive
- if the above specified
policies and rules are not met.WrongPolicy
- if the operation is not invoked
in the context of executing a request on
the specified servant and the required
policies are not present.public Servant reference_to_servant(Object reference) throws ObjectNotActive, WrongPolicy, WrongAdapter
reference_to_servant
3.3.8.21reference_to_servant
in interface POAOperations
reference
- object reference for which the
servant is returned.ObjectNotActive
- if the servant is not
present in the Active Object Map (for RETAIN)
or no default servant is registered (for
USE_DEFAULT_POLICY).WrongPolicy
- if neither the RETAIN policy or
the USE_DEFAULT_SERVANT policy is present.WrongAdapter
- if reference was not created by
this POA instance.public byte[] reference_to_id(Object reference) throws WrongAdapter, WrongPolicy
reference_to_id
3.3.8.22reference_to_id
in interface POAOperations
reference
- the object reference from which the
object id needs to be returned.WrongAdapter
- if the reference was not
created by the POA specified in the
reference.WrongPolicy
- declared to allow future
extensions.public Servant id_to_servant(byte[] id) throws ObjectNotActive, WrongPolicy
id_to_servant
3.3.8.23id_to_servant
in interface POAOperations
id
- object id for the which the servant is
returned.ObjectNotActive
- is raised if ObjectId is
is not in the Active Object Map (for RETAIN
policy), or no default servant is registered
(for USE_DEFAULT_SERVANT policy).WrongPolicy
- is raised if the RETAIN policy
or the USE_DEFAULT_SERVANT
policy is not present.public Object id_to_reference(byte[] id) throws ObjectNotActive, WrongPolicy
id_to_reference
3.3.8.24id_to_reference
in interface POAOperations
id
- id of the object for which the
reference is returned.ObjectNotActive
- if the Object Id value
is not active in the POA.WrongPolicy
- if the RETAIN policy is not
present.public byte[] id()
id
11.3.8.26 in ptc/00-08-06id
in interface POAOperations
public Policy getEffectivePolicy(int type)
getEffectivePolicy
in interface ObjectAdapter
getEffectivePolicy
in class ObjectAdapterBase
public int getManagerId()
ObjectAdapter
getManagerId
in interface ObjectAdapter
getManagerId
in class ObjectAdapterBase
public short getState()
ObjectAdapter
getState
in interface ObjectAdapter
getState
in class ObjectAdapterBase
public String[] getInterfaces(Object servant, byte[] objectId)
ObjectAdapter
getInterfaces
in interface ObjectAdapter
getInterfaces
in class ObjectAdapterBase
protected ObjectCopierFactory getObjectCopierFactory()
getObjectCopierFactory
in class ObjectAdapterBase
public void enter() throws OADestroyed
ObjectAdapter
enter
in interface ObjectAdapter
enter
in class ObjectAdapterBase
OADestroyed
- is thrown when an OA has been destroyed, which
requires a retry in the case where an AdapterActivator is present.public void exit()
ObjectAdapter
exit
in interface ObjectAdapter
exit
in class ObjectAdapterBase
public void getInvocationServant(OAInvocationInfo info)
ObjectAdapter
getInvocationServant
in interface ObjectAdapter
getInvocationServant
in class ObjectAdapterBase
info
- is the InvocationInfo object for the object referencepublic Object getLocalServant(byte[] objectId)
ObjectAdapter
getLocalServant
in interface ObjectAdapter
getLocalServant
in class ObjectAdapterBase
public void returnServant()
returnServant
in interface ObjectAdapter
returnServant
in class ObjectAdapterBase
Copyright © 2017 JBoss by Red Hat. All rights reserved.