All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.omg.CORBA.ORB

java.lang.Object
   |
   +----org.omg.CORBA.ORB

public abstract class ORB
extends Object
The Object Request Broker (ORB) privides functionality used by both client and servers (or more correctly, proxies and implementation objects). This class also provides a way to initialize the org.omg.CORBA infrastructure. The ORB is initialized and used as follows:
public class SimpleClientProgram {
public static void main(String args[]) {
try {
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
org.omg.CORBA.Object object = orb.string_to_object(args[0]);
System.out.println("Contacted object: " + object);
}
catch(org.omg.CORBA.SystemException se) {
System.out.println("Failure: " + se);
}
}
}

See Also:
BOA

Constructor Index

 o ORB()

Method Index

 o bind(String, String, String, BindOptions)
Locate an object given the specified bind parameters.
 o BOA_init()
Initilialize the BOA singleton.
 o BOA_init(String, Properties)
Initialize a particular type of BOA with optional properties.
 o connect(Object)
Connect an implementation to the ORB.
 o connect(Object, BOA[])
Call obj_is_ready on multiple BOAs and register the object with the locator.
 o create_alias_tc(String, String, TypeCode)
Create a type code describing an IDL alias.
 o create_any()
Create an empty any.
 o create_array_tc(int, TypeCode)
Create a type code describing an IDL array.
 o create_basic_dyn_any(TypeCode)
 o create_context(InputStream)
 o create_context_list()
Create an empty ContextList.
 o create_dyn_any(Any)
 o create_dyn_array(TypeCode)
 o create_dyn_enum(TypeCode)
 o create_dyn_sequence(TypeCode)
 o create_dyn_struct(TypeCode)
 o create_dyn_union(TypeCode)
 o create_enum_tc(String, String, String[])
Create a type code describing an IDL enum.
 o create_environment()
Creates an empty environment.
 o create_estruct_tc(String, String, TypeCode, StructMember[])
Create a type code describing an IDL estruct.
 o create_exception_list()
Create an empty ExceptionList.
 o create_exception_tc(String, String, StructMember[])
Create a type code describing an IDL exception.
 o create_interface_tc(String, String)
Create a type code describing an IDL interface.
 o create_list(int)
Create an NVList of the specified length.
 o create_named_value(String, Any, int)
Create a new NamedValue (for DII).
 o create_operation_list(OperationDef)
Create an NVList (for DII) given an operation description.
 o create_output_stream()
Create an IIOP output stream.
 o create_recursive_sequence_tc(int, int)
Create a type code describing an IDL sequence.
 o create_sequence_tc(int, TypeCode)
Create a type code describing an IDL sequence.
 o create_string_tc(int)
Create a type code describing an IDL string.
 o create_struct_tc(String, String, StructMember[])
Create a type code describing an IDL struct.
 o create_union_tc(String, String, TypeCode, UnionMember[])
Create a type code describing an IDL union.
 o create_wstring_tc(int)
Create a type code describing an IDL wstring.
 o default_bind_options()
Returns the default (global) bind options.
 o default_bind_options(BindOptions)
Sets the default (global) bind options.
 o default_principal()
Returns the default (global) principal.
 o default_principal(Principal)
Sets the default (global) principal.
 o disconnect(Object)
Disonnect an implementation from the ORB.
 o get_current()
Returns the Current object. Deprecated.
 o get_default_context()
Gets the global default context.
 o get_next_response()
Blocks until a response to a deferred request is available.
 o get_primitive_tc(TCKind)
Return the primitive type code associated with the kind.
 o init()
Initialize the ORB singleton from an application.
 o init(Applet)
Create a new ORB instance for an applet. Deprecated.
 o init(Applet, Properties)
Create a new ORB instance for an applet.
 o init(String[], Properties)
Create a new ORB instance for an application.
 o list_initial_services()
Returns a list of object services initially available to the process.
 o object_to_string(Object)
Convert an object reference to a string.
 o poll_next_response()
Returns true if the response to a deferred request is available, false otherwise.
 o resolve_initial_references(String)
Resolves one of the names returned by list_initial_services to the implementation object, if currently available.
 o send_multiple_requests_deferred(Request[])
Sends a number of non-oneway requests asynchronously.
 o send_multiple_requests_oneway(Request[])
Sends a number of oneway requests.
 o set_parameters(Applet, Properties)
Implemented by subclass ORB implementations.
 o set_parameters(String[], Properties)
Implemented by subclass ORB implementations.
 o shutdown()
Shutdown the ORB and destroy all internal ORB resources including all ORB created threads.
 o string_to_object(String)
Convert a string to an object reference.

Constructors

 o ORB
 public ORB()

Methods

 o init
 public static ORB init()
Initialize the ORB singleton from an application. Note that this method can be called repeatedly; the ORB is only initialized the first time the method is invoked. Thus, this method is useful to obtain a copy of the ORB singleton at any time.

Returns:
The ORB singleton.
See Also:
init
 o init
 public static ORB init(String args[],
                        Properties props)
Create a new ORB instance for an application.

Parameters:
args - application strings from main() method
props - application-specific properties
 o init
 public static ORB init(Applet applet)
Note: init() is deprecated. use init(java.applet.Applet applet, java.util.Properties props) instead.

Create a new ORB instance for an applet.

Parameters:
applet - The applet.
See Also:
init, Applet
 o init
 public static ORB init(Applet applet,
                        Properties props)
Create a new ORB instance for an applet.

Parameters:
applet - The applet.
props - Initialization properties (these may be null).
 o set_parameters
 protected abstract void set_parameters(String args[],
                                        Properties props)
Implemented by subclass ORB implementations.

 o set_parameters
 protected abstract void set_parameters(Applet app,
                                        Properties props)
Implemented by subclass ORB implementations.

 o BOA_init
 public BOA BOA_init()
Initilialize the BOA singleton. As with the init method, this method can be called repeated, and can be used to obtain the BOA singleton at any time.

Returns:
The BOA singleton.
See Also:
BOA
 o BOA_init
 public BOA BOA_init(String boaType,
                     Properties properties)
Initialize a particular type of BOA with optional properties.

Parameters:
boaType - A string identifying the type of BOA to be created.
properties - Properties to be passed to the BOA when it is created.
Returns:
The adapter corresponding to boaType.
See Also:
BOA
 o string_to_object
 public abstract Object string_to_object(String ior)
Convert a string to an object reference. Note that the return value can be narrowed to a specific interace. Also, if the ior parameter refers to an implementation object in the local address space, the resulting object will actually be a direct reference to the implementation object (i.e., the this pointer).

Parameters:
ior - A stringifed Internet Object Reference.
Returns:
An object reference.
Throws: INV_OBJREF
If the ior parameter is not well-formed.
 o object_to_string
 public abstract String object_to_string(Object obj)
Convert an object reference to a string. The resulting string is valid for the lifetime of the server, or if the implementation object is registered with an activation daemon, for the lifetime of the registration and/or the activation daemon(s).

Parameters:
obj - An object reference.
Returns:
A stringifed Internet Object Reference.
 o create_list
 public abstract NVList create_list(int length)
Create an NVList of the specified length.

Parameters:
length - The number of NamedValues in the list.
Returns:
A new NVList.
 o create_operation_list
 public abstract NVList create_operation_list(OperationDef operationDef)
Create an NVList (for DII) given an operation description.

Returns:
A new NVList.
 o create_named_value
 public abstract NamedValue create_named_value(String name,
                                               Any value,
                                               int flags)
Create a new NamedValue (for DII).

Parameters:
name - The named value's name.
value - The named value's value.
flags - The named value's flags (e.g. IN, OUT, or INOUT).
Returns:
A new NamedValue.
 o create_exception_list
 public abstract ExceptionList create_exception_list()
Create an empty ExceptionList.

 o create_context_list
 public abstract ContextList create_context_list()
Create an empty ContextList.

 o get_default_context
 public abstract Context get_default_context()
Gets the global default context. Updates to this shared resource should be synchronized.

Returns:
The global default context.
 o create_environment
 public abstract Environment create_environment()
Creates an empty environment.

Returns:
An empty environment.
 o send_multiple_requests_oneway
 public abstract void send_multiple_requests_oneway(Request reqs[])
Sends a number of oneway requests. Return values are not provided to oneway requests.

Parameters:
reqs - The oneway requests.
 o send_multiple_requests_deferred
 public abstract void send_multiple_requests_deferred(Request reqs[])
Sends a number of non-oneway requests asynchronously. Return values are can be obtained via poll_next_response and get_next_response.

Parameters:
reqs - The non-oneway requests.
 o poll_next_response
 public abstract boolean poll_next_response()
Returns true if the response to a deferred request is available, false otherwise.

 o get_next_response
 public abstract Request get_next_response() throws WrongTransaction
Blocks until a response to a deferred request is available.

Returns:
The next completed request.
Throws: WrongTransaction
is thrown if get_next_response was invoked from a different transaction's scope than the one from which the request was originally sent. See the OMG Transaction Service specification for details.
 o list_initial_services
 public abstract String[] list_initial_services()
Returns a list of object services initially available to the process.

Returns:
The list of object service names.
 o resolve_initial_references
 public abstract Object resolve_initial_references(String identifier) throws InvalidName
Resolves one of the names returned by list_initial_services to the implementation object, if currently available.

Returns:
The resolved object, which can be narrows to the appropriate server type.
Throws: InvalidName
if the name was not found in the initial service list.
 o get_primitive_tc
 public abstract TypeCode get_primitive_tc(TCKind kind)
Return the primitive type code associated with the kind.

Parameters:
The - constant type code kind, defined in org.omg.CORBA.TCKind
Returns:
The primitive type code.
Throws: BAD_PARAM
if the kind is out of range or is not for a primitive data type.
 o create_struct_tc
 public abstract TypeCode create_struct_tc(String repository_id,
                                           String type_name,
                                           StructMember members[])
Create a type code describing an IDL struct.

Parameters:
repository_id - The repository identifier specifying the type in IDL.
type_name - The unscoped type name of the type.
members - An array of structures defining the members of the type.
Returns:
The newly created type code.
 o create_estruct_tc
 public TypeCode create_estruct_tc(String repository_id,
                                   String type_name,
                                   TypeCode base,
                                   StructMember members[])
Create a type code describing an IDL estruct.

Parameters:
repository_id - The repository identifier specifying the type in IDL.
type_name - The unscoped type name of the type.
base - The estruct from which the current estruct inherits (use null to indicate that this is the root structure).
members - An array of structures defining the members of the type.
Returns:
The newly created type code.
 o create_union_tc
 public abstract TypeCode create_union_tc(String repository_id,
                                          String type_name,
                                          TypeCode discriminator_type,
                                          UnionMember members[])
Create a type code describing an IDL union.

Parameters:
repository_id - The repository identifier specifying the type in IDL.
type_name - The unscoped type name of the type.
discriminator_type - The type of the discriminator (e.g., the type used in the switch statement).
members - An array of structures defining the members of the type.
Returns:
The newly created type code.
 o create_enum_tc
 public abstract TypeCode create_enum_tc(String repository_id,
                                         String type_name,
                                         String members[])
Create a type code describing an IDL enum.

Parameters:
repository_id - The repository identifier specifying the type in IDL.
type_name - The unscoped type name of the type.
members - An array of strings defining the members of the type.
Returns:
The newly created type code.
 o create_alias_tc
 public abstract TypeCode create_alias_tc(String repository_id,
                                          String type_name,
                                          TypeCode original_type)
Create a type code describing an IDL alias.

Parameters:
repository_id - The repository identifier specifying the type in IDL.
type_name - The unscoped type name of the type.
original_type - The aliased type.
Returns:
The newly created type code.
 o create_exception_tc
 public abstract TypeCode create_exception_tc(String repository_id,
                                              String type_name,
                                              StructMember members[])
Create a type code describing an IDL exception.

Parameters:
repository_id - The repository identifier specifying the type in IDL.
type_name - The unscoped type name of the type.
members - An array of structures defining the members of the type.
Returns:
The newly created type code.
 o create_interface_tc
 public abstract TypeCode create_interface_tc(String repository_id,
                                              String type_name)
Create a type code describing an IDL interface.

Parameters:
repository_id - The repository identifier specifying the type in IDL.
type_name - The unscoped type name of the type.
Returns:
The newly created type code.
 o create_string_tc
 public abstract TypeCode create_string_tc(int length)
Create a type code describing an IDL string.

Parameters:
length - The length of the string (or zero if unbounded).
Returns:
The newly created type code.
 o create_wstring_tc
 public abstract TypeCode create_wstring_tc(int length)
Create a type code describing an IDL wstring.

Parameters:
length - The length of the string (or zero if unbounded).
Returns:
The newly created type code.
 o create_sequence_tc
 public abstract TypeCode create_sequence_tc(int length,
                                             TypeCode element_type)
Create a type code describing an IDL sequence.

Parameters:
length - The length of the sequence (or zero if unbounded).
element_type - The type of the elements contained by the sequence.
Returns:
The newly created type code.
 o create_recursive_sequence_tc
 public abstract TypeCode create_recursive_sequence_tc(int length,
                                                       int offset)
Create a type code describing an IDL sequence.

Parameters:
length - The length of the sequence (or zero if unbounded).
offset - The offset into the type code's (recursive) definition.
Returns:
The newly created type code.
 o create_array_tc
 public abstract TypeCode create_array_tc(int length,
                                          TypeCode element_type)
Create a type code describing an IDL array.

Parameters:
length - The length of the array.
element_type - The type of the elements contained by the array.
Returns:
The newly created type code.
 o get_current
 public Current get_current()
Note: get_current() is deprecated. Use resolve_initial_references() instead.

Returns the Current object.

 o default_principal
 public Principal default_principal()
Returns the default (global) principal.

Returns:
a principal if one has been set, null otherwise. Note that the bind options are stored by reference, so care must be taken in modifying the value.
See Also:
_principal, get_principal
 o default_principal
 public void default_principal(Principal principal)
Sets the default (global) principal.

Parameters:
principal - The new principal. Note that the bind options are stored by reference, so care must be taken in modifying the value.
See Also:
_principal
 o default_bind_options
 public BindOptions default_bind_options()
Returns the default (global) bind options.

Returns:
the bind options, if they have been set, null otherwise. Note that the bind options are stored by reference, so care must be taken in modifying the value.
 o default_bind_options
 public void default_bind_options(BindOptions options)
Sets the default (global) bind options.

Parameters:
options - The new bind options. Note that the bind options are stored by reference, so care must be taken in modifying the value.
 o create_output_stream
 public abstract OutputStream create_output_stream()
Create an IIOP output stream. An array of bytes can be extracted from the stream, which conststitutes a IIOP buffer.

 o create_any
 public abstract Any create_any()
Create an empty any. The any's type code will be null.

 o connect
 public abstract void connect(Object object)
Connect an implementation to the ORB. See BOA#obj_is_ready(org.omg.CORBA.Object)

 o connect
 public void connect(Object object,
                     BOA boas[])
Call obj_is_ready on multiple BOAs and register the object with the locator.

Parameters:
object - Object to register with adapters
boas - Array containing adapters with which to register object
See Also:
BOA
 o disconnect
 public abstract void disconnect(Object object)
Disonnect an implementation from the ORB. See BOA#deactivate_obj(org.omg.CORBA.Object)

 o create_context
 public Context create_context(InputStream input)
 o bind
 public Object bind(String repository_id,
                    String object_name,
                    String host_name,
                    BindOptions bind_options)
Locate an object given the specified bind parameters.

Parameters:
repository_id - The repository identifier (type id) of the object to locate.
object_name - The name of the object to locate, or null for any object.
host_name - The host name or IP address of the machine where the object is located, or null for any machine.
bind_options - The bind for the located object, or null to pick up the defaults.
Returns:
An object reference which can be narrowed to the requested type.
Throws: NO_IMPLEMENT
If an object could not be located.
 o shutdown
 public void shutdown()
Shutdown the ORB and destroy all internal ORB resources including all ORB created threads. This method must be called before the ORB can be garbage collected.

 o create_dyn_any
 public DynAny create_dyn_any(Any value)
 o create_basic_dyn_any
 public DynAny create_basic_dyn_any(TypeCode type) throws InconsistentTypeCode
 o create_dyn_struct
 public DynStruct create_dyn_struct(TypeCode type) throws InconsistentTypeCode
 o create_dyn_sequence
 public DynSequence create_dyn_sequence(TypeCode type) throws InconsistentTypeCode
 o create_dyn_array
 public DynArray create_dyn_array(TypeCode type) throws InconsistentTypeCode
 o create_dyn_union
 public DynUnion create_dyn_union(TypeCode type) throws InconsistentTypeCode
 o create_dyn_enum
 public DynEnum create_dyn_enum(TypeCode type) throws InconsistentTypeCode

All Packages  Class Hierarchy  This Package  Previous  Next  Index