org.jacorb.orb.policies
public class PolicyManager extends _PolicyManagerLocalBase
Version: $Id: PolicyManager.java,v 1.8 2006/07/07 10:55:41 alphonse.bendt Exp $
Constructor Summary | |
---|---|
PolicyManager(Configuration config)
public c'tor |
Method Summary | |
---|---|
Policy[] | get_policy_overrides(int[] ts)
Returns a PolicyList containing the overridden Polices for the
requested PolicyTypes. |
void | set_policy_overrides(Policy[] policies, SetOverrideType set_add)
Modifies the current set of overrides with the requested list
of Policy overrides. |
Parameters: ts a sequence of overridden policy types identifying the policies that are to be retrieved.
Returns: the list of overridden policies of the types specified by ts
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.
Parameters: policies a sequence of Policy objects that are to be associated with the PolicyManager object. 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.
Throws: org.omg.CORBA.InvalidPolicies a list of indices identifying the position in the input policies list that are occupied by invalid policies org.omg.CORBA.BAD_PARAM if the sequence contains two or more Policy objects with the same PolicyType value, the operation raises the standard sytem exception BAD_PARAM with standard minor code 30.