Previous | Table of Contents | Next |
4.3.8.1 get_policy
The get_policy
operation returns the policy object of the specified type (see Section
4.8, “Policy Object? on page 4-38), which applies to this object. It returns the
effective Policy for the object reference. The effective Policy is the one that would be used if a request were made.
This Policy is determined first by obtaining the effective override for the PolicyType as returned by get_client_policy. The
effective override is then compared with the Policy as specified in the IOR. The effective Policy is determined by reconciling
the effective override and the IOR-specified Policy
(see Section 4.9.2, “Server Side
Policy Management? on page 4-45). If the two policies cannot be reconciled, the
standard system exception INV_POLICY is raised with standard minor code 1. The absence of a Policy value in the IOR implies
that any legal value may be used.
Invoking non_existent on an object reference prior to get_policy ensures the accuracy of the returned effective Policy. If
get_policy is invoked prior to the object reference being bound, a compliant implementation shall attempt a binding and then
return the effective Policy. If the binding attempt fails it shall pass through the system exception returned from the binding
attempt. Note that if the effective Policy may change from invocation to invocation due to transparent rebinding.
Policy get_policy ( in PolicyType policy_type );
Parameter(s)
policy_type - The type of policy to be obtained.
Return Value
A Policy object of the type specified by the policy_type parameter.
Exception(s)
CORBA::INV_POLICY -raised when the value of policy type is not valid either because the specified type is not supported by
this ORB or because a policy object of that type is not associated with this Object.
The implementation of this operation may involve remote invocation of an operation (e.g., DomainManager::get_domain_policy
for some security policies) for some policy types.
4.3.8.2 get_client_policy
Policy get_client_policy(in PolicyType type
);
Returns the effective overriding Policy for the object reference. The effective override is obtained by first checking for
an override of the given PolicyType at the Object scope, then at the Current scope, and finally at the ORB scope. If no override
is present for the requested PolicyType, a system-dependent default value for that Policy Type may be returned. A nil Policy
reference may also be returned to indicate that there is no default for the policy. Portable applications are expected to
set the desired “defaults? at the ORB scope since default Policy values are not specified.
4.3.8.3 get_policy_overrides
PolicyList get_policy_overrides( in PolicyTypeSeq types );
Returns the list of Policy overrides (of the specified policy types) set at the Object scope. 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 Object
scope, an empty sequence is returned.