Package com.sun.corba.ee.impl.oa.poa
Interface POAPolicyMediator
- All Known Implementing Classes:
POAPolicyMediatorBase
,POAPolicyMediatorBase_R
,POAPolicyMediatorImpl_NR_UDS
,POAPolicyMediatorImpl_NR_USM
,POAPolicyMediatorImpl_R_AOM
,POAPolicyMediatorImpl_R_UDS
,POAPolicyMediatorImpl_R_USM
@ManagedData
@Description("Handles the Policy-specific parts of the POA")
public interface POAPolicyMediator
POAPolicyMediator defines an interface to which the POA delegates all
policy specific operations. This permits code paths for different
policies to be optimized by creating the correct code at POA creation
time. Also note that as much as possible, this interface does not
do any concurrency control, except as noted. The POA is responsible
for concurrency control.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activateObject
(byte[] id, Servant servant) void
clearAOM()
Delete everything in the active object map.deactivateObject
(byte[] id) Deactivate the object that is associated with the given id.void
Etherealize all servants associated with this POAPolicyMediator.Return the default servant.getInvocationServant
(byte[] id, String operation) Get the servant to use for an invocation with the given id and operation.Return the policies object that was used to create this POAPolicyMediator.int
getScid()
Return the subcontract ID to use in the IIOP profile in IORs created by this POAPolicyMediator's POA.Return the servant manager.int
Return the server ID to use in the IIOP profile in IORs created by this POAPolicyMediator's POA.idToServant
(byte[] id) byte[]
Allocate a new, unique system ID.void
Release a servant that was obtained from getInvocationServant.byte[]
servantToId
(Servant servant) void
setDefaultServant
(Servant servant) Set the default servant.void
setServantManager
(ServantManager servantManager) Set the servant manager.
-
Method Details
-
getPolicies
Return the policies object that was used to create this POAPolicyMediator.- Returns:
- The policies of this POA
-
getScid
@ManagedAttribute @Description("This POA\'s subcontract ID") int getScid()Return the subcontract ID to use in the IIOP profile in IORs created by this POAPolicyMediator's POA. This is initialized according to the policies and the POA used to construct this POAPolicyMediator in the POAPolicyMediatorFactory.- Returns:
- This POA's subcontract ID.
-
getServerId
@ManagedAttribute @Description("This POA\'s server ID") int getServerId()Return the server ID to use in the IIOP profile in IORs created by this POAPolicyMediator's POA. This is initialized according to the policies and the POA used to construct this POAPolicyMediator in the POAPolicyMediatorFactory.- Returns:
- This POA's server ID.
-
getInvocationServant
Get the servant to use for an invocation with the given id and operation.- Parameters:
id
- the object ID for which we are requesting a servantoperation
- the name of the operation to be performed on the servant- Returns:
- the resulting Servant.
- Throws:
ForwardRequest
- if the current ORB must forward the result.
-
returnServant
void returnServant()Release a servant that was obtained from getInvocationServant. -
etherealizeAll
void etherealizeAll()Etherealize all servants associated with this POAPolicyMediator. Does nothing if the retention policy is non-retain. -
clearAOM
void clearAOM()Delete everything in the active object map. -
getServantManager
Return the servant manager. Will throw WrongPolicy if the request processing policy is not USE_SERVANT_MANAGER.- Returns:
- The current ServantManager
- Throws:
WrongPolicy
- If the request processing policy is not USE_SERVANT_MANAGER
-
setServantManager
Set the servant manager. Will throw WrongPolicy if the request processing policy is not USE_SERVANT_MANAGER.- Parameters:
servantManager
- The ServantManager- Throws:
WrongPolicy
- if the request processing policy is not USE_SERVANT_MANAGER.
-
getDefaultServant
Return the default servant. Will throw WrongPolicy if the request processing policy is not USE_DEFAULT_SERVANT.- Returns:
- the default Servant
- Throws:
NoServant
- if no Servant has been setWrongPolicy
- if the policy is not USE_DEFAULT_SERVANT
-
setDefaultServant
Set the default servant. Will throw WrongPolicy if the request processing policy is not USE_DEFAULT_SERVANT.- Parameters:
servant
- The default Servant- Throws:
WrongPolicy
- if the request processing policy is not USE_DEFAULT_SERVANT.
-
activateObject
void activateObject(byte[] id, Servant servant) throws ObjectAlreadyActive, ServantAlreadyActive, WrongPolicy -
deactivateObject
Deactivate the object that is associated with the given id. Returns the servant for id.- Parameters:
id
- ID of the object to deactivate- Returns:
- Servant for the ID
- Throws:
ObjectNotActive
- if the object was not activeWrongPolicy
- if not supported by the current policy
-
newSystemId
Allocate a new, unique system ID. Requires the ID assignment policy to be SYSTEM.- Returns:
- the new system ID
- Throws:
WrongPolicy
- if the ID assignment policy is not SYSTEM
-
servantToId
- Throws:
ServantNotActive
WrongPolicy
-
idToServant
- Throws:
ObjectNotActive
WrongPolicy
-