|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
org.omg.CORBA.ORB

public abstract class 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
|
|
| Method Summary | |
|---|---|
void |
connect
Connects the given servant object (a Java object that is an instance of the server implementation class) to the ORB. |
TypeCode |
create_abstract_interface_tc
Create a TypeCode object for an IDL abstract interface. |
abstract TypeCode |
create_alias_tc
Creates a TypeCode object representing an IDL alias
(typedef). |
abstract Any |
create_any
Creates an IDL Any object initialized to
contain a Typecode object whose kind field
is set to TCKind.tc_null. |
abstract TypeCode |
create_array_tc
Creates a TypeCode object representing an IDL array. |
DynAny |
create_basic_dyn_any
Deprecated. Use the new DynAnyFactory API instead |
abstract ContextList |
create_context_list
Creates an empty ContextList object. |
DynAny |
create_dyn_any
Deprecated. Use the new DynAnyFactory API instead |
DynArray |
create_dyn_array
Deprecated. Use the new DynAnyFactory API instead |
DynEnum |
create_dyn_enum
Deprecated. Use the new DynAnyFactory API instead |
DynSequence |
create_dyn_sequence
Deprecated. Use the new DynAnyFactory API instead |
DynStruct |
create_dyn_struct
Deprecated. Use the new DynAnyFactory API instead |
DynUnion |
create_dyn_union
Deprecated. Use the new DynAnyFactory API instead |
abstract TypeCode |
create_enum_tc
Creates a TypeCode object representing an IDL enum. |
abstract Environment |
create_environment
Creates an Environment object. |
abstract ExceptionList |
create_exception_list
Creates an empty ExceptionList object. |
abstract TypeCode |
create_exception_tc
Creates a TypeCode object representing an IDL exception. |
TypeCode |
create_fixed_tc
Create a TypeCode object for an IDL fixed type. |
abstract TypeCode |
create_interface_tc
Creates a TypeCode object representing an IDL interface. |
abstract NVList |
create_list
Allocates an NVList with (probably) enough
space for the specified number of NamedValue objects. |
abstract NamedValue |
create_named_value
Creates a NamedValue object
using the given name, value, and argument mode flags. |
TypeCode |
create_native_tc
Create a TypeCode object for an IDL native type. |
NVList |
create_operation_list
Creates an NVList initialized with argument
descriptions for the operation described in the given
OperationDef object. |
abstract OutputStream |
create_output_stream
Creates a new org.omg.CORBA.portable.OutputStream into which
IDL method parameters can be marshalled during method invocation. |
Policy |
create_policy
Can be invoked to create new instances of policy objects of a specific type with specified initial state. |
abstract TypeCode |
create_recursive_sequence_tc
Deprecated. Use a combination of create_recursive_tc and create_sequence_tc instead |
TypeCode |
create_recursive_tc
Create a recursive TypeCode object which
serves as a placeholder for a concrete TypeCode during the process of creating
TypeCodes which contain recursion. |
abstract TypeCode |
create_sequence_tc
Creates a TypeCode object representing an IDL sequence. |
abstract TypeCode |
create_string_tc
Creates a TypeCode object representing a bounded IDL
string. |
abstract TypeCode |
create_struct_tc
Creates a TypeCode object representing an IDL struct. |
abstract TypeCode |
create_union_tc
Creates a TypeCode object representing an IDL union. |
TypeCode |
create_value_box_tc
Creates a TypeCode object for an IDL value box. |
TypeCode |
create_value_tc
Create a TypeCode object for an IDL value type. |
abstract TypeCode |
create_wstring_tc
Creates a TypeCode object representing a bounded IDL
wstring (wide string). |
void |
destroy
Destroys the ORB so that its resources can be reclaimed. |
void |
disconnect
Disconnects the given servant object from the ORB. |
Current |
get_current
Deprecated. use resolve_initial_references. |
abstract Context |
get_default_context
Gets the default Context object. |
abstract Request |
get_next_response
Gets the next Request instance for which a response
has been received. |
abstract TypeCode |
get_primitive_tc
Retrieves the TypeCode object that represents
the given primitive IDL type. |
boolean |
get_service_information
Used to obtain information about CORBA facilities and services that are supported by this ORB. |
static ORB |
init
Returns the ORB singleton object. |
static ORB |
init
Creates a new ORB instance for an applet. |
static ORB |
init
Creates a new ORB instance for a standalone
application. |
abstract String |
list_initial_services
Returns a list of the initially available CORBA object references, such as "NameService" and "InterfaceRepository". |
abstract String |
object_to_string
Converts the given CORBA object reference to a string. |
void |
perform_work
Performs an implementation-dependent unit of work if called by the main thread. |
abstract boolean |
poll_next_response
Finds out if any of the deferred (asynchronous) invocations have a response yet. |
abstract Object |
resolve_initial_references
Resolves a specific object reference from the set of available initial service names. |
void |
run
This operation blocks the current thread until the ORB has completed the shutdown process, initiated when some thread calls shutdown. |
abstract void |
send_multiple_requests_deferred
Sends multiple dynamic (DII) requests asynchronously. |
abstract void |
send_multiple_requests_oneway
Sends multiple dynamic (DII) requests asynchronously without expecting any responses. |
protected abstract void |
set_parameters
Allows the ORB implementation to be initialized with the given applet and parameters. |
protected abstract void |
set_parameters |