VisiBroker for Java

org.omg.PortableInterceptor
Interface ORBInitInfoOperations

All Known Subinterfaces:
ORBInitInfo

public interface ORBInitInfoOperations

Passed to each ORBInitializer, allowing it to to register interceptors and perform other duties while the ORB is initializing. The ORBInitInfo object is only valid during ORB::init. If a service keeps a reference to its ORBInitInfo object and tries to use it after ORB::init returns, the object no longer exists and an OBJECT_NOT_EXIST exception shall be thrown.


Method Summary
 void add_client_request_interceptor(ClientRequestInterceptor interceptor)
          This method is used to add a client side request interceptor to the list of client side request interceptors.
 void add_ior_interceptor(IORInterceptor interceptor)
          This method is used to add an IOR interceptor to the list of IOR interceptors.
 void add_server_request_interceptor(ServerRequestInterceptor interceptor)
          This method is used to add a server side request interceptor to the list of server side request interceptors.
 int allocate_slot_id()
          This method returns the index to the slot which has been allocated.
 java.lang.String[] arguments()
          This method returns the arguments passed to ORB_init().
 CodecFactory codec_factory()
          Returns the IOP::CodecFactory.
 java.lang.String orb_id()
          This method returns the ID of the ORB being initialized.
 void register_initial_reference(java.lang.String id, Object obj)
          This method is identical to ORB::register_initial_reference().
 void register_policy_factory(int type, PolicyFactory policy_factory)
          This method registers a PolicyFactory for the given PolicyType.
 Object resolve_initial_references(java.lang.String id)
          This method is only valid during post_init().
 

Method Detail

register_policy_factory

void register_policy_factory(int type,
                             PolicyFactory policy_factory)
This method registers 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:
type - The CORBA::PolicyType that the given PolicyFactory serves.
The - factory for the given CORBA::PolicyType.
policy_factory - The factory for the given CORBA::PolicyType.

allocate_slot_id

int allocate_slot_id()
This method returns the index to the slot which has been allocated. A service calls allocate_slot_id to allocate a slot on PortableInterceptor::Current. Note: While slot ids can be allocated within an ORB initializer, the slots themselves cannot be initialized. Calling set_slot() or get_slot() on the Current within an ORB initializer will raise a BAD_INV_ORDER with a minor code of 14.

Returns:
index of the slot that has been allocated.

add_ior_interceptor

void add_ior_interceptor(IORInterceptor interceptor)
                         throws DuplicateName
This method 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 exception is raised.

Parameters:
interceptor - The IORInterceptor to be added.
Throws:
DuplicateName - DuplicateName is raised when an interceptor with the same name has already been registered

add_server_request_interceptor

void add_server_request_interceptor(ServerRequestInterceptor interceptor)
                                    throws DuplicateName
This method 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 exception is raised.

Parameters:
interceptor - The ServerRequestInterceptor to be added.
Throws:
DuplicateName - DuplicateName is raised when an interceptor with the same name has already been registered

add_client_request_interceptor

void add_client_request_interceptor(ClientRequestInterceptor interceptor)
                                    throws DuplicateName
This method 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 exception will be raised.

Parameters:
interceptor - The ClientRequestInterceptor to be added.
Throws:
DuplicateName - DuplicateName is raised when an interceptor with the same name has already been registered

resolve_initial_references

Object resolve_initial_references(java.lang.String id)
                                  throws InvalidName
This method 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.

Parameters:
id - The ID by which the initial reference will be known.
Returns:
Corba Object
Throws:
InvalidName - InvalidName is raised when there is no initial reference by that name

register_initial_reference

void register_initial_reference(java.lang.String id,
                                Object obj)
                                throws InvalidName
This method is identical to ORB::register_initial_reference(). 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 method on the ORB uses PIDL (ORB::ObjectId and ORB::InvalidName) whereas the version in this interface uses IDL defined in this interface; the semantics are identical.

register_initial_reference() raises an InvalidName exception if this method is called with an empty string id; or this method is called with an id that is already registered, including the default names defined by OMG.

Parameters:
id - The ID by which the initial reference will be known.
obj - The initial reference itself.
Throws:
InvalidName - InvalidName is raised when either a OMG defined internal InitialReference name is used or there is another initial reference registered with the same name, or the id is empty

codec_factory

CodecFactory codec_factory()
Returns the IOP::CodecFactory. The Codec Factory is normally obtained through 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.


orb_id

java.lang.String orb_id()
This method returns the ID of the ORB being initialized.


arguments

java.lang.String[] arguments()
This method returns the arguments passed to ORB_init(). They may or may not contain the ORB's arguments.


Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online