Previous | Table of Contents | Next |
module CORBA {
local interface PolicyManager {
PolicyList get_policy_overrides(in PolicyTypeSeq ts);
void set_policy_overrides(
in PolicyList | policies, | ||||
in SetOverrideType | set_add | ||||
) raises (InvalidPolicies); | |||||
}; |
local interface PolicyCurrent : PolicyManager, Current {
};
};
4.9.3.1 interface PolicyManager
The PolicyManager operations are used for setting and accessing Policy overrides at a particular scope. For example, an instance
of the PolicyCurrent is used for specifying Policy overrides that apply to invocations from that thread (unless they are
overridden at the Object scope as described in Section 4.9.1, “Client Side Policy
Management? on page 4-44).
get_policy_overrides
PolicyList get_policy_overrides(in PolicyTypeSeq ts);
Parameterts |
|||||
a sequence of overridden policy types identifying the policies that | |||||
are to be retrieved. |
Return Value
policy list the list of overridden policies of the types specified by ts.
Exceptions
none
Returns a PolicyList containing the overridden Polices for the requested PolicyTypes. If the specified sequence is empty,
all Policy overrides at this scope will be returned. If none of the requested PolicyTypes are overridden at the target PolicyManager,
an empty sequence is returned. This accessor returns only those Policy overrides that have been set at the specific scope
corresponding to the target PolicyManager (no evaluation is done with respect to overrides at other scopes).
set_policy_overrides
void set_policy_overrides( in PolicyList policies, in SetOverrideType set_add
) raises (InvalidPolicies);
Parameter
policies a sequence of Policy objects that are to be associated with the PolicyManager object. If the sequence contains two
or more Policy objects with the same PolicyType value, the operation raises the standard system exception BAD_PARAM with standard
minor code 30.
set_add whether the association is in addition to (ADD_OVERRIDE) or as a replacement of (SET_OVERRIDE) any existing overrides
already associated with the PolicyManager object. If the value of this parameter is SET_OVERRIDE, the supplied policies completely
replace all existing overrides associated with the PolicyManager object. If the value of this parameter is ADD_OVERRIDE,
the supplied policies are added to the existing overrides associated with the PolicyManager object, except that if a supplied
Policy object has the same PolicyType value as an existing override, the supplied Policy object replaces the existing override.
Return Value
none.
Exceptions
InvalidPolicies a list of indices identifying the position in the input policies list that are occupied by invalid policies.
Modifies the current set of overrides with the requested list of Policy overrides. The first parameter policies is a sequence
of references to Policy objects. The second parameter set_add of type SetOverrideType indicates whether these policies should
be added onto any other overrides that already exist (ADD_OVERRIDE) in the PolicyManager, or they should be added to a clean
PolicyManager free of any other overrides (SET_OVERRIDE). Invoking set_policy_overrides with an empty sequence of policies
and a mode of SET_OVERRIDE removes all overrides from a PolicyManager. Only certain policies that pertain to the invocation
of an operation at the client end can be overridden using this operation. Attempts to override any other policy will result
in the raising of the CORBA::NO_PERMISSION exception. If the request would put the set of overriding policies for the target
PolicyManager in an inconsistent state, no policies are changed or added, and the exception InvalidPolicies is raised. There
is no evaluation of compatibility with policies set within other PolicyManagers.
4.9.3.2 interface PolicyCurrent
This specific PolicyManager provides access to policies overridden at the Thread scope. A reference to a thread’s PolicyCurrent
is obtained through an invocation of CORBA::ORB::resolve_initial_references.