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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activateObject(byte[] id, Servant servant)
void
clearAOM()
Delete everything in the active object map.Servant
deactivateObject(byte[] id)
Deactivate the object that is associated with the given id.void
etherealizeAll()
Etherealize all servants associated with this POAPolicyMediator.Servant
getDefaultServant()
Return the default servant.java.lang.Object
getInvocationServant(byte[] id, java.lang.String operation)
Get the servant to use for an invocation with the given id and operation.Policies
getPolicies()
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.ServantManager
getServantManager()
Return the servant manager.int
getServerId()
Return the server ID to use in the IIOP profile in IORs created by this POAPolicyMediator's POA.Servant
idToServant(byte[] id)
byte[]
newSystemId()
Allocate a new, unique system ID.void
returnServant()
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 Detail
-
getPolicies
@ManagedAttribute @Description("The policies of this POA") Policies 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
java.lang.Object getInvocationServant(byte[] id, java.lang.String operation) throws ForwardRequest
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
ServantManager getServantManager() throws WrongPolicy
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
void setServantManager(ServantManager servantManager) throws WrongPolicy
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
Servant getDefaultServant() throws NoServant, WrongPolicy
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
void setDefaultServant(Servant servant) throws WrongPolicy
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
Servant deactivateObject(byte[] id) throws ObjectNotActive, WrongPolicy
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
byte[] newSystemId() throws WrongPolicy
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
byte[] servantToId(Servant servant) throws ServantNotActive, WrongPolicy
- Throws:
ServantNotActive
WrongPolicy
-
idToServant
Servant idToServant(byte[] id) throws ObjectNotActive, WrongPolicy
- Throws:
ObjectNotActive
WrongPolicy
-
-