java.lang.Object
|
+--org.omg.CORBA.ORB
A class providing APIs for the CORBA Object Request Broker features. The
ORB class also provides
"pluggable ORB implementation" APIs that allow another vendor's ORB
implementation to be used.
An ORB makes it possible for CORBA objects to communicate with each other by connecting objects making requests (clients) with objects servicing requests (servers).
The ORB class, which
encapsulates generic CORBA functionality, does the following:
(Note that items 5 and 6, which include most of the methods in
the class ORB, are typically used with the Dynamic Invocation
Interface (DII) and the Dynamic Skeleton Interface
(DSI).
These interfaces may be used by a developer directly, but
most commonly they are used by the ORB internally and are
not seen by the general programmer.)
resolve_initial_references
TypeCode
Any
NamedValue
Context
Environment
NVList) containing these objects
The ORB class can be used to obtain references to objects
implemented anywhere on the network.
An application or applet gains access to the CORBA environment
by initializing itself into an ORB using one of
three init methods. Two of the three methods use the properties
(associations of a name with a value) shown in the
table below.
| Property Name | Property Value |
|---|---|
| org.omg.CORBA.ORBClass | class name of an ORB implementation |
| org.omg.CORBA.ORBSingletonClass | class name of the ORB returned by init() |
These properties allow a different vendor's ORB
implementation to be "plugged in."
When an ORB instance is being created, the class name of the ORB implementation is located using the following standard search order:
Note that Java IDL provides a default implementation for the
fully-functional ORB and for the Singleton ORB. When the method
init is given no parameters, the default Singleton
ORB is returned. When the method init is given parameters
but no ORB class is specified, the Java IDL ORB implementation
is returned.
The following code fragment creates an ORB object
initialized with the default ORB Singleton.
This ORB has a
restricted implementation to prevent malicious applets from doing
anything beyond creating typecodes.
It is called a singleton
because there is only one instance for an entire virtual machine.
ORB orb = ORB.init();
The following code fragment creates an ORB object
for an application. The parameter args
represents the arguments supplied to the application's main
method. Since the property specifies the ORB class to be
"SomeORBImplementation", the new ORB will be initialized with
that ORB implementation. If p had been null,
and the arguments had not specified an ORB class,
the new ORB would have been
initialized with the default Java IDL implementation.
Properties p = new Properties();
p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation");
ORB orb = ORB.init(args, p);
The following code fragment creates an ORB object
for the applet supplied as the first parameter. If the given
applet does not specify an ORB class, the new ORB will be
initialized with the default Java IDL implementation.
ORB orb = ORB.init(myApplet, null);
An application or applet can be initialized in one or more ORBs. ORB initialization is a bootstrap call into the CORBA world.
| Constructor Summary | |
ORB
copy-> new ORB()copy-> <ORB var> = new ORB(); |
|
| Method Summary | |
void |
connect(Object obj)
copy-> .connect( )copy-> <ORB>.connect(<Object obj>);
|
TypeCode |
create_abstract_interface_tc(String id,
String name)
copy-> .create_abstract_interface_tc(, )copy-> <TypeCode var>=<ORB>.create_abstract_interface_tc(<String id>, <String name>);
|
abstract TypeCode |
create_alias_tc(String id,
String name,
TypeCode original_type)
copy-> .create_alias_tc(, , )copy-> <TypeCode var>=<ORB>.create_alias_tc(<String id>, <String name>, <TypeCode original_type>);
|
abstract Any |
create_any()
copy-> .create_any()copy-> <Any var>=<ORB>.create_any();
|
abstract TypeCode |
create_array_tc(int length,
TypeCode element_type)
copy-> .create_array_tc(, )copy-> <TypeCode var>=<ORB>.create_array_tc(<int length>, <TypeCode element_type>);
|
DynAny |
create_basic_dyn_any(TypeCode type)
copy-> .create_basic_dyn_any( )copy-> <DynAny var>=<ORB>.create_basic_dyn_any(<TypeCode type>);
|
abstract ContextList |
create_context_list()
copy-> .create_context_list()copy-> <ContextList var>=<ORB>.create_context_list();
|
DynAny |
create_dyn_any(Any value)
copy-> .create_dyn_any( )copy-> <DynAny var>=<ORB>.create_dyn_any(<Any value>);
|
DynArray |
create_dyn_array(TypeCode type)
copy-> .create_dyn_array( )copy-> <DynArray var>=<ORB>.create_dyn_array(<TypeCode type>);
|
DynEnum |
create_dyn_enum(TypeCode type)
copy-> .create_dyn_enum( )copy-> <DynEnum var>=<ORB>.create_dyn_enum(<TypeCode type>);
|
DynSequence |
create_dyn_sequence(TypeCode type)
copy-> .create_dyn_sequence( )copy-> <DynSequence var>=<ORB>.create_dyn_sequence(<TypeCode type>);
|
DynStruct |
create_dyn_struct(TypeCode type)
copy-> .create_dyn_struct( )copy-> <DynStruct var>=<ORB>.create_dyn_struct(<TypeCode type>);
|
DynUnion |
create_dyn_union(TypeCode type)
copy-> .create_dyn_union( )copy-> <DynUnion var>=<ORB>.create_dyn_union(<TypeCode type>);
|
abstract TypeCode |
create_enum_tc(String id,
String name,
String[] members)
copy-> .create_enum_tc(, , )copy-> <TypeCode var>=<ORB>.create_enum_tc(<String id>, <String name>, <String[] members>);
|
abstract Environment |
create_environment()
copy-> .create_environment()copy-> <Environment var>=<ORB>.create_environment();
|
abstract ExceptionList |
create_exception_list()
copy-> .create_exception_list()copy-> <ExceptionList var>=<ORB>.create_exception_list();
|
abstract TypeCode |
create_exception_tc(String id,
String name,
StructMember[] members)
copy-> .create_exception_tc(, , )copy-> <TypeCode var>=<ORB>.create_exception_tc(<String id>, <String name>, <StructMember[] members>);
|
TypeCode |
create_fixed_tc(short digits,
short scale)
copy-> .create_fixed_tc(, )copy-> <TypeCode var>=<ORB>.create_fixed_tc(<short digits>, <short scale>);
|
abstract TypeCode |
create_interface_tc(String id,
String name)
copy-> .create_interface_tc(, )copy-> <TypeCode var>=<ORB>.create_interface_tc(<String id>, <String name>);
|
abstract NVList |
create_list(int count)
copy-> .create_list( )copy-> <NVList var>=<ORB>.create_list(<int count>);
|
abstract NamedValue |
create_named_value(String s,
Any any,
int flags)
copy-> .create_named_value(, , )copy-> <NamedValue var>=<ORB>.create_named_value(<String s>, <Any any>, <int flags>);
|
TypeCode |
create_native_tc(String id,
String name)
copy-> .create_native_tc(, )copy-> <TypeCode var>=<ORB>.create_native_tc(<String id>, <String name>);
|
NVList |
create_operation_list(Object oper)
copy-> .create_operation_list( )copy-> <NVList var>=<ORB>.create_operation_list(<Object oper>);
|
abstract OutputStream |
create_output_stream()
copy-> .create_output_stream()copy-> <OutputStream var>=<ORB>.create_output_stream();
|
Policy |
create_policy(int type,
Any val)
copy-> .create_policy(, )copy-> <Policy var>=<ORB>.create_policy(<int type>, <Any val>);
|
abstract TypeCode |
create_recursive_sequence_tc(int bound,
int offset)
copy-> .create_recursive_sequence_tc(, )copy-> <TypeCode var>=<ORB>.create_recursive_sequence_tc(<int bound>, <int offset>);
|
TypeCode |
create_recursive_tc(String id)
copy-> .create_recursive_tc( )copy-> <TypeCode var>=<ORB>.create_recursive_tc(<String id>);
|
abstract TypeCode |
create_sequence_tc(int bound,
TypeCode element_type)
copy-> .create_sequence_tc(, )copy-> <TypeCode var>=<ORB>.create_sequence_tc(<int bound>, <TypeCode element_type>);
|
abstract TypeCode |
create_string_tc(int bound)
copy-> .create_string_tc( )copy-> <TypeCode var>=<ORB>.create_string_tc(<int bound>);
|
abstract TypeCode |
create_struct_tc(String id,
String name,
StructMember[] members)
copy-> .create_struct_tc(, , )copy-> <TypeCode var>=<ORB>.create_struct_tc(<String id>, <String name>, <StructMember[] members>);
|
abstract TypeCode |
create_union_tc(String id,
String name,
TypeCode discriminator_type,
UnionMember[] members)
copy-> .create_union_tc(, , , )copy-> <TypeCode var>=<ORB>.create_union_tc(<String id>, <String name>, <TypeCode discriminator_type>, <UnionMember[] members>);
|
TypeCode |
create_value_box_tc(String id,
String name,
TypeCode boxed_type)
copy-> .create_value_box_tc(, , )copy-> <TypeCode var>=<ORB>.create_value_box_tc(<String id>, <String name>, <TypeCode boxed_type>);
|
TypeCode |
create_value_tc(String id,
String name,
short type_modifier,
TypeCode concrete_base,
ValueMember[] members)
copy-> .create_value_tc(, , , , )copy-> <TypeCode var>=<ORB>.create_value_tc(<String id>, <String name>, <short type_modifier>, <TypeCode concrete_base>, <ValueMember[] members>);
|
abstract TypeCode |
create_wstring_tc(int bound)
copy-> .create_wstring_tc( )copy-> <TypeCode var>=<ORB>.create_wstring_tc(<int bound>);
|
void |
destroy()
copy-> .destroy()copy-> <ORB>.destroy();
|