Previous | Table of Contents | Next |
An ORB or CORBA service may choose to allow access to certain choices that affect its operation. This information is accessed
in a structured manner using interfaces derived from the Policy interface defined in the CORBA module. A CORBA service does
not have to use this method of accessing operating options, but may choose to do so. The Security Service in particular uses
this technique for associating Security Policy with objects in the system.
module CORBA { typedef unsigned long PolicyType;
// Basic IDL definition
interface Policy { readonly attribute PolicyType policy_type; Policy copy(); void destroy();
};
typedef sequence <Policy> PolicyList; typedef sequence <PolicyType> PolicyTypeSeq;
};
PolicyType defines the type of Policy object. In general the constant values that are allocated are defined in conjunction
with the definition of the corresponding Policy object. The values of PolicyTypes for policies that are standardized by OMG
are allocated by OMG. Additionally, vendors may reserve blocks of 4096 PolicyType values identified by a 20 bit Vendor PolicyType
Valueset ID (VPVID) for their own use.
PolicyType which is an unsigned long consists of the 20-bit VPVID in the high order 20 bits, and the vendor assigned policy
value in the low order 12 bits. The VPVIDs 0 through \xf are reserved for OMG. All values for the standard PolicyTypes are
allocated within this range by OMG. Additionally, the VPVIDs \xfffff is reserved for experimental use and OMGVMCID
(Section 4.12.3, “Standard System Exception
Definitions? on page 4-66) is reserved for OMG use. These will not be allocated to
anybody. Vendors can request allocation of VPVID by sending mail to tag-request@omg.org.
When a VMCID
(Section 4.12, “Exceptions? on page 4-63) is allocated to a vendor
automatically the same value of VPVID is reserved for the vendor and vice versa. So once a vendor gets either a VMCID or a
VPVID registered they can use that value for both their minor codes and their policy types.
4.8.1.1 Copy
Policy copy();
Return Value
This operation copies the policy object. The copy does not retain any relationships that the policy had with any domain, or
object.
4.8.1.2 Destroy
void destroy();
This operation destroys the policy object. It is the responsibility of the policy object to determine whether it can be destroyed.
Exception(s)
CORBA::NO_PERMISSION - raised when the policy object determines that it cannot be destroyed.
4.8.1.3 Policy_type
readonly attribute policy_type
Return Value
This readonly attribute returns the constant value of type PolicyType that corresponds to the type of the Policy object.