Package com.sun.corba.ee.impl.oa.poa
Class POAPolicyMediatorBase
- java.lang.Object
-
- com.sun.corba.ee.impl.oa.poa.POAPolicyMediatorBase
-
- All Implemented Interfaces:
POAPolicyMediator
- Direct Known Subclasses:
POAPolicyMediatorBase_R
,POAPolicyMediatorImpl_NR_UDS
,POAPolicyMediatorImpl_NR_USM
public abstract class POAPolicyMediatorBase extends java.lang.Object implements POAPolicyMediator
Implementation of POARequesHandler that provides policy specific operations on the POA.
-
-
Field Summary
Fields Modifier and Type Field Description private DelegateImpl
delegateImpl
protected boolean
isImplicit
protected boolean
isSystemId
protected boolean
isUnique
protected static OMGSystemException
omgWrapper
protected ORB
orb
protected POAImpl
poa
private Policies
policies
private int
scid
private int
serverid
private int
sysIdCounter
protected static POASystemException
wrapper
-
Constructor Summary
Constructors Constructor Description POAPolicyMediatorBase(Policies policies, POAImpl poa)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.int
getServerId()
Return the server ID to use in the IIOP profile in IORs created by this POAPolicyMediator's POA.protected abstract java.lang.Object
internalGetServant(byte[] id, java.lang.String operation)
byte[]
newSystemId()
Allocate a new, unique system ID.protected void
setDelegate(Servant servant, byte[] id)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.corba.ee.impl.oa.poa.POAPolicyMediator
activateObject, clearAOM, deactivateObject, etherealizeAll, getDefaultServant, getServantManager, idToServant, returnServant, servantToId, setDefaultServant, setServantManager
-
-
-
-
Field Detail
-
wrapper
protected static final POASystemException wrapper
-
omgWrapper
protected static final OMGSystemException omgWrapper
-
poa
protected POAImpl poa
-
orb
protected ORB orb
-
sysIdCounter
private int sysIdCounter
-
policies
private Policies policies
-
delegateImpl
private DelegateImpl delegateImpl
-
serverid
private int serverid
-
scid
private int scid
-
isImplicit
protected boolean isImplicit
-
isUnique
protected boolean isUnique
-
isSystemId
protected boolean isSystemId
-
-
Method Detail
-
getPolicies
public final Policies getPolicies()
Description copied from interface:POAPolicyMediator
Return the policies object that was used to create this POAPolicyMediator.- Specified by:
getPolicies
in interfacePOAPolicyMediator
- Returns:
- The policies of this POA
-
getScid
public final int getScid()
Description copied from interface:POAPolicyMediator
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.- Specified by:
getScid
in interfacePOAPolicyMediator
- Returns:
- This POA's subcontract ID.
-
getServerId
public final int getServerId()
Description copied from interface:POAPolicyMediator
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.- Specified by:
getServerId
in interfacePOAPolicyMediator
- Returns:
- This POA's server ID.
-
getInvocationServant
public final java.lang.Object getInvocationServant(byte[] id, java.lang.String operation) throws ForwardRequest
Description copied from interface:POAPolicyMediator
Get the servant to use for an invocation with the given id and operation.- Specified by:
getInvocationServant
in interfacePOAPolicyMediator
- 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.
-
setDelegate
protected final void setDelegate(Servant servant, byte[] id)
-
newSystemId
public byte[] newSystemId() throws WrongPolicy
Description copied from interface:POAPolicyMediator
Allocate a new, unique system ID. Requires the ID assignment policy to be SYSTEM.- Specified by:
newSystemId
in interfacePOAPolicyMediator
- Returns:
- the new system ID
- Throws:
WrongPolicy
- if the ID assignment policy is not SYSTEM
-
internalGetServant
protected abstract java.lang.Object internalGetServant(byte[] id, java.lang.String operation) throws ForwardRequest
- Throws:
ForwardRequest
-
-