# OpenORB 1.3.1: Class ORB

## org.openorb.CORBA
Class ORB

    java.lang.Object
      |
      +--org.omg.CORBA.ORB
            |
            +--org.omg.CORBA_2_3.ORB
                  |
                  +--org.openorb.CORBA.ORBSingleton
                        |
                        +--org.openorb.CORBA.ORB

All Implemented Interfaces:
  org.apache.avalon.framework.logger.LogEnabled

public class ORB
extends ORBSingleton

This class provides all required operations and structures for the org.openorb implementation.

Author:
  Chris Wood, Jerome Daniel, Michael Rumpf

Constructor Summary
`ORB()` Orb instances must be created through ORB.init

Method Summary
`void` `addInitialReference(java.lang.String name, Object target)` Register an initial reference.
`void` `addServiceInformation(short service_type, ServiceInformation service_information)` Add service information
`void` `connect(Object obj)` Connect an object to the adapter
`ContextList` `create_context_list()` Create a context list
`Environment` `create_environment()` Create an environment
`ExceptionList` `create_exception_list()` Create an exception list
`NVList` `create_list(int count)` Create a named value list
`NamedValue` `create_named_value(java.lang.String name, Any value, int flags)` Create a named value
`OutputStream` `create_output_stream()` Create an Output stream
`Policy` `create_policy(int policy_type, Any val)` This operations creates a CORBA policy.
`void` `disconnect(Object obj)` Disconnect an object from the adapter
`Context` `get_default_context()` Return default context
`Request` `get_next_response()` Get the next response.
`boolean` `get_service_information(short service_type, ServiceInformationHolder service_information)` Return the service informaton
`java.lang.Object` `getFeature(java.lang.String feature)` This operation is used to get an OpenORB feature reference.
`ORBLoader` `getLoader()` This operation returns the configurator used by this ORB instance
`CurrentImpl` `getPICurrent()` Returns the PICurrent implementation.
`java.lang.String[]` `list_initial_services()` Return as a string sequence all available initial services.
`ValueFactory` `lookup_value_factory(java.lang.String id)` This function is used to find a value factory
`java.lang.String` `object_to_string(Object obj)` Convert an object reference to a string
`void` `perform_work()` Perform all current work
`boolean` `poll_next_response()` Poll next response
`ValueFactory` `register_value_factory(java.lang.String id, ValueFactory factory)` This function is used to register a value factory
`ValueFactory` `register_value_factory(java.lang.String id, ValueFactory factory, org.apache.avalon.framework.configuration.Configuration config)` This function is used to register a value factory with a supplied configuration.
`Object` `resolve_initial_references(java.lang.String object_name)` Return an initial reference.
`void` `run()` Run the server side.
`void` `send_multiple_requests_deferred(Request[] req)` Send multiple deferred requests
`void` `send_multiple_requests_oneway(Request[] req)` Send multiple oneway requests
`void` `set_delegate(java.lang.Object wrapper)` This function is used to set a delegate
`void` `setFeature(java.lang.String feature, java.lang.Object reference)` This operation is used to set an OpenORB feature reference.
`void` `shutdown(boolean wait_for_completion)` Stop the orb ( and the object adapter if required )
`Object` `string_to_object(java.lang.String str)` Convert a string to an object reference
`void` `unregister_value_factory(java.lang.String id)` This function is used to unregister a value factory
`boolean` `work_pending()` Check if some work are pending

Methods inherited from class org.openorb.CORBA.ORBSingleton

`create_abstract_interface_tc, create_alias_tc, create_any, create_array_tc, create_enum_tc, create_exception_tc, create_fixed_tc, create_interface_tc, create_local_interface_tc, create_native_tc, create_recursive_sequence_tc, create_recursive_tc, create_sequence_tc, create_string_tc, create_struct_tc, create_union_tc, create_value_box_tc, create_value_tc, create_wstring_tc, enableLogging, get_primitive_tc, getLogger`

Methods inherited from class org.omg.CORBA_2_3.ORB
`get_value_def`

Methods inherited from class org.omg.CORBA.ORB
`create_operation_list, get_current, init, init, init`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ORB

    public ORB()

  Orb instances must be created through ORB.init

Method Detail

### setFeature

    public void setFeature(java.lang.String feature,
                           java.lang.Object reference)

  This operation is used to set an OpenORB feature reference.

### getFeature

    public java.lang.Object getFeature(java.lang.String feature)

  This operation is used to get an OpenORB feature reference.

### getLoader

    public ORBLoader getLoader()

  This operation returns the configurator used by this ORB instance

### getPICurrent

    public CurrentImpl getPICurrent()

  Returns the PICurrent implementation. The PICurrent must be resolved with every invocation both at the client and server end, so it's avalable from this operation for optimization reasons.

### addInitialReference

    public void addInitialReference(java.lang.String name,
                                    Object target)

  Register an initial reference.

### addServiceInformation

    public void addServiceInformation(short service_type,
                                      ServiceInformation service_information)

  Add service information

### resolve_initial_references

    public Object resolve_initial_references(java.lang.String object_name)
                                      throws InvalidName

  Return an initial reference. This method tries to find a reference from the following locations in the following order:
  1. internal initial reference table
  2. -ORBInitRef parameter
  3. -ORBDefaultInitRef
  Overrides:
    `resolve_initial_references` in class `ORBSingleton`

### list_initial_services

    public java.lang.String[] list_initial_services()

  Return as a string sequence all available initial services.
  Overrides:
    `list_initial_services` in class `ORBSingleton`

### run

    public void run()

  Run the server side.
  Overrides:
    `run` in class `ORBSingleton`

### shutdown

    public void shutdown(boolean wait_for_completion)

  Stop the orb ( and the object adapter if required )
  Overrides:
    `shutdown` in class `ORBSingleton`

### work_pending

    public boolean work_pending()

  Check if some work are pending
  Overrides:
    `work_pending` in class `ORBSingleton`

### perform_work

    public void perform_work()

  Perform all current work
  Overrides:
    `perform_work` in class `ORBSingleton`

### create_output_stream

    public OutputStream create_output_stream()

  Create an Output stream
  Overrides:
    `create_output_stream` in class `ORBSingleton`

### create_list

    public NVList create_list(int count)

  Create a named value list
  Overrides:
    `create_list` in class `ORBSingleton`

### create_named_value

    public NamedValue create_named_value(java.lang.String name,
                                         Any value,
                                         int flags)

  Create a named value
  Overrides:
    `create_named_value` in class `ORBSingleton`

### create_exception_list

    public ExceptionList create_exception_list()

  Create an exception list
  Overrides:
    `create_exception_list` in class `ORBSingleton`

### create_context_list

    public ContextList create_context_list()

  Create a context list
  Overrides:
    `create_context_list` in class `ORBSingleton`

### get_default_context

    public Context get_default_context()

  Return default context
  Overrides:
    `get_default_context` in class `ORBSingleton`

### create_environment

    public Environment create_environment()

  Create an environment
  Overrides:
    `create_environment` in class `ORBSingleton`

### connect

    public void connect(Object obj)

  Connect an object to the adapter
  Overrides:
    `connect` in class `ORBSingleton`

### disconnect

    public void disconnect(Object obj)

  Disconnect an object from the adapter
  Overrides:
    `disconnect` in class `ORBSingleton`

### object_to_string

    public java.lang.String object_to_string(Object obj)

  Convert an object reference to a string
  Overrides:
    `object_to_string` in class `ORBSingleton`

### string_to_object

    public Object string_to_object(java.lang.String str)

  Convert a string to an object reference
  Overrides:
    `string_to_object` in class `ORBSingleton`

### send_multiple_requests_oneway

    public void send_multiple_requests_oneway(Request[] req)

  Send multiple oneway requests
  Overrides:
    `send_multiple_requests_oneway` in class `ORBSingleton`

### send_multiple_requests_deferred

    public void send_multiple_requests_deferred(Request[] req)

  Send multiple deferred requests
  Overrides:
    `send_multiple_requests_deferred` in class `ORBSingleton`

### poll_next_response

    public boolean poll_next_response()

  Poll next response
  Overrides:
    `poll_next_response` in class `ORBSingleton`

### get_next_response

    public Request get_next_response()

  Get the next response. If poll_next_response would return true then the first completed request will be returned, otherwise the oldest and first request will be waited for and returned.
  Overrides:
    `get_next_response` in class `ORBSingleton`

### register_value_factory

    public ValueFactory register_value_factory(java.lang.String id,
                                               ValueFactory factory,
                                               org.apache.avalon.framework.configuration.Configuration config)

  This function is used to register a value factory with a supplied configuration. This method is a non-standard extension supporting value factories that implement Avalon lifecycle methods.
  Parameters:
    `id` - the IDL valuetype identifier
    `factory` - the value factory instance
    `cofig` - the factory configuration
  Returns:
    ValueFactory

### register_value_factory

    public ValueFactory register_value_factory(java.lang.String id,
                                               ValueFactory factory)

  This function is used to register a value factory
  Overrides:
    `register_value_factory` in class `ORBSingleton`
  Parameters:
    `id` - the IDL valuetype identifier
    `factory` - the value factory instance
  Returns:
    ValueFactory

### unregister_value_factory

    public void unregister_value_factory(java.lang.String id)

  This function is used to unregister a value factory
  Overrides:
    `unregister_value_factory` in class `ORBSingleton`

### lookup_value_factory

    public ValueFactory lookup_value_factory(java.lang.String id)

  This function is used to find a value factory
  Overrides:
    `lookup_value_factory` in class `ORBSingleton`

### set_delegate

    public void set_delegate(java.lang.Object wrapper)

  This function is used to set a delegate
  Overrides:
    `set_delegate` in class `ORBSingleton`

### get_service_information

    public boolean get_service_information(short service_type,
                                           ServiceInformationHolder service_information)

  Return the service informaton
  Overrides:
    `get_service_information` in class `ORBSingleton`

### create_policy

    public Policy create_policy(int policy_type,
                                Any val)
                         throws PolicyError

  This operations creates a CORBA policy.
  Overrides:
    `create_policy` in class `ORBSingleton`