org.openorb.policy
Class ORBPolicyManagerImpl

java.lang.Object
  |
  +--org.omg.CORBA.LocalObject
        |
        +--org.openorb.policy.ORBPolicyManagerImpl
All Implemented Interfaces:
IDLEntity, Object, PolicyFactory, PolicyFactoryManager, PolicyFactoryOperations, PolicyManager, PolicyManagerOperations, PolicyReconciler, PolicyReconcilerOperations, PolicySetManager, java.io.Serializable

public class ORBPolicyManagerImpl
extends LocalObject
implements PolicyManager, PolicyReconciler, PolicyFactoryManager, PolicySetManager, PolicyFactory

Version:
$Revision: 1.6 $ $Date: 2002/07/14 19:12:37 $
Author:
Chris Wood
See Also:
Serialized Form

Fields inherited from interface org.openorb.policy.PolicySetManager
CLIENT_POLICY_DOMAIN, GLOBAL_POLICY_DOMAIN, SERVER_POLICY_DOMAIN
 
Constructor Summary
ORBPolicyManagerImpl()
          Constructor.
 
Method Summary
 void add_invalid_policy_type(int policy_domain, int policy_type)
          Add an invalid policy type to a policy domain.
 int add_policy_domain()
          Add a new policy domain.
 void add_policy_factory(int type, PolicyFactory factory)
          add a policy factory.
 void add_policy_reconciler(int policy_type, PolicyReconciler reconciler)
           
 PolicyManagerOperations create_policy_set()
          Create a new policy set with no membership restrictions.
 PolicyManagerOperations create_policy_set(int policy_domain)
          This operation creates new policy manager objects.
 Policy create_policy(int type, Any val)
          Invoke the manager to create a policy.
 Policy[] get_policy_overrides(int[] ts)
          Returns a PolicyList containing the overridden Polices for the requested PolicyTypes.
 Policy reconcile_policies(int policy_type, Policy client_policy, Policy profile_policy, DomainManager[] domain_managers)
          Merge policies of given type from the given domains.
 void set_policy_overrides(Policy[] policies, SetOverrideType set_add)
          Modifies the current set of overrides with the requested list of Policy overrides.
 
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Constructor Detail

ORBPolicyManagerImpl

public ORBPolicyManagerImpl()
Constructor.
Method Detail

set_policy_overrides

public void set_policy_overrides(Policy[] policies,
                                 SetOverrideType set_add)
                          throws InvalidPolicies
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.
Specified by:
set_policy_overrides in interface PolicyManagerOperations

get_policy_overrides

public Policy[] get_policy_overrides(int[] ts)
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.
Specified by:
get_policy_overrides in interface PolicyManagerOperations

create_policy_set

public PolicyManagerOperations create_policy_set()
Create a new policy set with no membership restrictions.
Specified by:
create_policy_set in interface PolicySetManager

create_policy_set

public PolicyManagerOperations create_policy_set(int policy_domain)
This operation creates new policy manager objects. To create a policy set which excludes certain policy types use this method.
Specified by:
create_policy_set in interface PolicySetManager

add_invalid_policy_type

public void add_invalid_policy_type(int policy_domain,
                                    int policy_type)
Add an invalid policy type to a policy domain.
Specified by:
add_invalid_policy_type in interface PolicySetManager

add_policy_domain

public int add_policy_domain()
Add a new policy domain. A policy domain excludes certain policy types, attempting to set override policies of that type results in InvalidPolicies exceptions.
Specified by:
add_policy_domain in interface PolicySetManager
Returns:
new policy domain id.

reconcile_policies

public Policy reconcile_policies(int policy_type,
                                 Policy client_policy,
                                 Policy profile_policy,
                                 DomainManager[] domain_managers)
Merge policies of given type from the given domains.
Specified by:
reconcile_policies in interface PolicyReconcilerOperations
Parameters:
policy_type - Policy type. client_policy and profile_policy must be of this type.
client_policy - effective client override. (may be null)
profile_policy - policy specified in profile. (may be null)
domain_managers - domain managers.
Returns:
Merged policy, or null for no policy of given type.
Throws:
INV_POLICY - if merge cannot be performed.

add_policy_reconciler

public void add_policy_reconciler(int policy_type,
                                  PolicyReconciler reconciler)

add_policy_factory

public void add_policy_factory(int type,
                               PolicyFactory factory)
add a policy factory.
Specified by:
add_policy_factory in interface PolicyFactoryManager

create_policy

public Policy create_policy(int type,
                            Any val)
                     throws PolicyError
Invoke the manager to create a policy.
Specified by:
create_policy in interface PolicyFactoryOperations