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
-
ORB()
-
-
bind(String, String, String, BindOptions)
-
Locate an object given the specified bind parameters.
-
BOA_init()
- Initilialize the BOA singleton.
-
BOA_init(String, Properties)
- Initialize a particular type of BOA with optional properties.
-
connect(Object)
- Connect an implementation to the ORB.
-
connect(Object, BOA[])
- Call obj_is_ready on multiple BOAs and register the object with
the locator.
-
create_alias_tc(String, String, TypeCode)
- Create a type code describing an IDL alias.
-
create_any()
-
Create an empty any.
-
create_array_tc(int, TypeCode)
- Create a type code describing an IDL array.
-
create_basic_dyn_any(TypeCode)
-
-
create_context(InputStream)
-
-
create_context_list()
- Create an empty ContextList.
-
create_dyn_any(Any)
-
-
create_dyn_array(TypeCode)
-
-
create_dyn_enum(TypeCode)
-
-
create_dyn_sequence(TypeCode)
-
-
create_dyn_struct(TypeCode)
-
-
create_dyn_union(TypeCode)
-
-
create_enum_tc(String, String, String[])
- Create a type code describing an IDL enum.
-
create_environment()
- Creates an empty environment.
-
create_estruct_tc(String, String, TypeCode, StructMember[])
- Create a type code describing an IDL estruct.
-
create_exception_list()
- Create an empty ExceptionList.
-
create_exception_tc(String, String, StructMember[])
- Create a type code describing an IDL exception.
-
create_interface_tc(String, String)
- Create a type code describing an IDL interface.
-
create_list(int)
- Create an NVList of the specified length.
-
create_named_value(String, Any, int)
- Create a new NamedValue (for DII).
-
create_operation_list(OperationDef)
- Create an NVList (for DII) given an operation description.
-
create_output_stream()
-
Create an IIOP output stream.
-
create_recursive_sequence_tc(int, int)
- Create a type code describing an IDL sequence.
-
create_sequence_tc(int, TypeCode)
- Create a type code describing an IDL sequence.
-
create_string_tc(int)
- Create a type code describing an IDL string.
-
create_struct_tc(String, String, StructMember[])
- Create a type code describing an IDL struct.
-
create_union_tc(String, String, TypeCode, UnionMember[])
- Create a type code describing an IDL union.
-
create_wstring_tc(int)
- Create a type code describing an IDL wstring.
-
default_bind_options()
- Returns the default (global) bind options.
-
default_bind_options(BindOptions)
-
Sets the default (global) bind options.
-
default_principal()
- Returns the default (global) principal.
-
default_principal(Principal)
-
Sets the default (global) principal.
-
disconnect(Object)
- Disonnect an implementation from the ORB.
-
get_current()
- Returns the Current object.
Deprecated.
-
get_default_context()
- Gets the global default context.
-
get_next_response()
- Blocks until a response to a deferred request is available.
-
get_primitive_tc(TCKind)
- Return the primitive type code associated with the kind.
-
init()
- Initialize the ORB singleton from an application.
-
init(Applet)
- Create a new ORB instance for an applet.
Deprecated.
-
init(Applet, Properties)
- Create a new ORB instance for an applet.
-
init(String[], Properties)
- Create a new ORB instance for an application.
-
list_initial_services()
- Returns a list of object services initially available to the process.
-
object_to_string(Object)
- Convert an object reference to a string.
-
poll_next_response()
- Returns true if the response to a deferred request is available,
false otherwise.
-
resolve_initial_references(String)
- Resolves one of the names returned by list_initial_services to
the implementation object, if currently available.
-
send_multiple_requests_deferred(Request[])
- Sends a number of non-oneway requests asynchronously.
-
send_multiple_requests_oneway(Request[])
- Sends a number of oneway requests.
-
set_parameters(Applet, Properties)
- Implemented by subclass ORB implementations.
-
set_parameters(String[], Properties)
- Implemented by subclass ORB implementations.
-
shutdown()
- Shutdown the ORB and destroy all internal ORB resources including all
ORB created threads.
-
string_to_object(String)
- Convert a string to an object reference.
ORB
public ORB()
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
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
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
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).
set_parameters
protected abstract void set_parameters(String args[],
Properties props)
- Implemented by subclass ORB implementations.
set_parameters
protected abstract void set_parameters(Applet app,
Properties props)
- Implemented by subclass ORB implementations.
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
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
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.
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.
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.
create_operation_list
public abstract NVList create_operation_list(OperationDef operationDef)
- Create an NVList (for DII) given an operation description.
- Returns:
- A new NVList.
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.
create_exception_list
public abstract ExceptionList create_exception_list()
- Create an empty ExceptionList.
create_context_list
public abstract ContextList create_context_list()
- Create an empty ContextList.
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.
create_environment
public abstract Environment create_environment()
- Creates an empty environment.
- Returns:
- An empty environment.
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.
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.
poll_next_response
public abstract boolean poll_next_response()
- Returns true if the response to a deferred request is available,
false otherwise.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
get_current
public Current get_current()
- Note: get_current() is deprecated.
Use resolve_initial_references() instead.
- Returns the Current object.
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
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
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.
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.
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.
create_any
public abstract Any create_any()
- Create an empty any. The any's type code will be null.
connect
public abstract void connect(Object object)
- Connect an implementation to the ORB.
See BOA#obj_is_ready(org.omg.CORBA.Object)
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
disconnect
public abstract void disconnect(Object object)
- Disonnect an implementation from the ORB.
See BOA#deactivate_obj(org.omg.CORBA.Object)
create_context
public Context create_context(InputStream input)
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.
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.
create_dyn_any
public DynAny create_dyn_any(Any value)
create_basic_dyn_any
public DynAny create_basic_dyn_any(TypeCode type) throws InconsistentTypeCode
create_dyn_struct
public DynStruct create_dyn_struct(TypeCode type) throws InconsistentTypeCode
create_dyn_sequence
public DynSequence create_dyn_sequence(TypeCode type) throws InconsistentTypeCode
create_dyn_array
public DynArray create_dyn_array(TypeCode type) throws InconsistentTypeCode
create_dyn_union
public DynUnion create_dyn_union(TypeCode type) throws InconsistentTypeCode
create_dyn_enum
public DynEnum create_dyn_enum(TypeCode type) throws InconsistentTypeCode
All Packages Class Hierarchy This Package Previous Next Index