Package com.sun.corba.se.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
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 TypeMethodDescriptionvoidactivateObject(byte[] id, Servant servant) voidclearAOM()Delete everything in the active object map.deactivateObject(byte[] id) Deactivate the object that is associated with the given id.voidEtherealize 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.intgetScid()Return the subcontract ID to use in the IIOP profile in IORs created by this POAPolicyMediator's POA.Return the servant manager.intReturn 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.voidRelease a servant that was obtained from getInvocationServant.byte[]servantToId(Servant servant) voidsetDefaultServant(Servant servant) Set the default servant.voidsetServantManager(ServantManager servantManager) Set the servant manager.
-
Method Details
-
getPolicies
Policies getPolicies()Return the policies object that was used to create this POAPolicyMediator. -
getScid
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. -
getServerId
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. -
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
-
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.- Throws:
WrongPolicy
-
setServantManager
Set the servant manager. Will throw WrongPolicy if the request processing policy is not USE_SERVANT_MANAGER.- Throws:
WrongPolicy
-
getDefaultServant
Return the default servant. Will throw WrongPolicy if the request processing policy is not USE_DEFAULT_SERVANT.- Throws:
NoServantWrongPolicy
-
setDefaultServant
Set the default servant. Will throw WrongPolicy if the request processing policy is not USE_DEFAULT_SERVANT.- Throws:
WrongPolicy
-
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.- Throws:
ObjectNotActiveWrongPolicy
-
newSystemId
Allocate a new, unique system ID. Requires the ID assignment policy to be SYSTEM.- Throws:
WrongPolicy
-
servantToId
- Throws:
ServantNotActiveWrongPolicy
-
idToServant
- Throws:
ObjectNotActiveWrongPolicy
-