Previous Table of Contents Next


21.7.2 ORBInitInfo Interface


   module PortableInterceptor {

   local interface ORBInitInfo { typedef string ObjectId; exception DuplicateName {

   string name; }; exception InvalidName {};

   readonly attribute CORBA::StringSeq arguments;readonly attribute string orb_id;readonly attribute IOP::CodecFactory codec_factory;

   void register_initial_reference (in ObjectId id, in Object obj) raises (InvalidName); Object resolve_initial_references ( in ObjectId id) raises (InvalidName); void add_client_request_interceptor (

   in ClientRequestInterceptor interceptor)

   raises (DuplicateName);

   void add_server_request_interceptor ( in ServerRequestInterceptor interceptor) raises (DuplicateName);

   void add_ior_interceptor (in IORInterceptor interceptor)

   raises (DuplicateName);

   SlotId allocate_slot_id ();

   void register_policy_factory (

   in CORBA::PolicyType type,in PolicyFactory policy_factory);};};

   21.7.2.1 DuplicateName Exception

   Only one Interceptor of a given name can be registered with the ORB for each Interceptor type. If an attempt is made to register a second Interceptor with the same name, DuplicateName is raised.

   An Interceptor may be anonymous; that is, have an empty string as the name attribute. Any number of anonymous Interceptors may be registered with the ORB so, if the Interceptor being registered is anonymous, the registration operation will not raise DuplicateName.

   21.7.2.2 InvalidName Exception

   This exception is raised by register_initial_reference andresolve_initial_references.

   register_initial_reference raises InvalidName if:

   resolve_initial_references raises InvalidName if the name to be resolved is invalid.

   21.7.2.3 arguments

   This attribute contains the arguments passed to ORB_init. They may or may not contain the ORB’s arguments.

   21.7.2.4 orb_id

   This attribute is the ID of the ORB being initialized.

   21.7.2.5 codec_factory

   This attribute is the IOP::CodecFactory. The CodecFactory is normally obtained via a call to ORB::resolve_initial_references (“CodecFactory?), but since the ORB is not yet available and Interceptors, particularly when processing service contexts, will require a Codec, a means of obtaining a Codec is necessary during ORB initialization.

   21.7.2.6 register_initial_reference

   This operation is identical to ORB::register_initial_reference described there. This same functionality exists here because the ORB, not yet fully initialized, is not yet available but initial references may need to be registered as part of Interceptor registration. The only difference is that the version of this operation on the ORB uses PIDL (CORBA::ORB::ObjectId and CORBA::ORB::InvalidName) whereas the version in this interface uses IDL defined in this interface; the semantics are identical.

   21.7.2.7 resolve_initial_references

   See Section 21.7, “Registering Interceptors,? on page 21-50. This operation is only valid during post_init. It is identical to ORB::resolve_initial_references. This same functionality exists here because the ORB, not yet fully initialized, is not yet available but initial references may be required from the ORB as part of Interceptor registration. The only difference is that the version of this operation on the ORB uses PIDL (CORBA::ORB::ObjectId and CORBA::ORB::InvalidName) whereas the version in this interface uses IDL defined in this interface; the semantics are identical.

   21.7.2.8 add_client_request_interceptor

   This operation is used to add a client-side request Interceptor to the list of client-side request Interceptors.

   If a client-side request Interceptor has already been registered with this Interceptor’s name, DuplicateName is raised.

   .


   21.7.2.9 add_server_request_interceptor

   This operation is used to add a server-side request Interceptor to the list of server-side request Interceptors.

   If a server-side request Interceptor has already been registered with this Interceptor’s name, DuplicateName is raised.


   21.7.2.10 add_ior_interceptor

   This operation is used to add an IOR Interceptor to the list of IOR Interceptors.

   If an IOR Interceptor has already been registered with this Interceptor’s name, DuplicateName is raised..


   21.7.2.11 allocate_slot_id

   A service calls allocate_slot_id to allocate a slot onPortableInterceptor::Current.

   Note that while slot ids can be allocated within an ORB initializer, the slots themselves cannot be initialized. Calling set_slot or get_slot on the PICurrent (see Section 21.4, “Portable Interceptor Current,? on page 21-33) within an ORB initializer shall raise a BAD_INV_ORDER with a minor code of 14.


   21.7.2.12 register_policy_factory

   Register a PolicyFactory for the given PolicyType.

   If a PolicyFactory already exists for the given PolicyType, BAD_INV_ORDER is raised with a standard minor code of 16.

Parameters

Description

type The CORBA::PolicyType that the given PolicyFactory serves.
policy_factory The factory for the given CORBA::PolicyType.