Class org.omg.corba.orb description

zhaozj2021-02-11  155

ORB

Abstract public class org.omg.corba.orb

Author: Cocia Lin

Note: This article is a translation in the source code of JDK1.3.

The ORB class is provided for CORBA ORB. The ORB class also provides insertion into the ORB (Pluggable ORB Implementation) to allow ORB providers to implement.

An ORB enables CORBA objects to communicate with each other through the Customer Request (Client) and the SERVER.

The ORB class encapsulates the general CORBA feature, including the following: (Note: Articles 5 and 6 contains most methods of the ORB class, typically used in Dynamic Invocation Interfacd (DSI) and Dynamicskeleton Interface (DSI). The interface may be used directly by the developer, but in most cases, they are used inside the orb, and the programmer can't see them)

Initialization ORB is achieved by providing a predetermined attribute value and environmental parameters. The initialization object parameters containing the service, such as NAMESERVICE, using resolve_initial_references to convert between object reference combined strings. Connect the ORB to a server (a CORBA object implementation instance) and disconnect from Servant. Create such an object: Typecode * Any * namedValue * Context * Environment * lists (SUCH AS NVLIST) Containing these Objects *

Pass multiple messages in DII.

The ORB class can be used to get references to objects implemented anywhere on the network.

An Application or Applet is initialized in the ORB in ORB to obtain a visiting entry to obtain a CORBA environment in ORB. Two methods of which use the properties in the table below:

Basic Java CORBA properties

Property Name

Property Value

Org.omg.corba.orbclass

ORB implemented class name

Org.omg.corba.orbsingletonclass

ORB class name returned by init ()

These properties allow different ORB providers to provide different implementations.

When an ORB instance is created, the class name of the ORB implements the order in the following:

Detect Applet parameters or APPLICATION strings array. Detection Attribute Parameter Detection System Parameters Detects the orb.properties file in the java.home / lib directory. Use the default parameters (using Java IDL implementation)

Note: Java IDL provides a default implementation for full-featureless ORB and Singleton ORB. When the INIT method does not provide parameters, return the default list ORB. The parameters are provided to the init method but no ORB class is provided, returning the ORB implementation of Java IDL.

The following code snippet creates an ORB object using the default list ORB. This ORB has a restriction implementation to prevent malicious unrestricted applets. The use of the list is because a JVM has only one ORB instance.

* Orb = orb.init ();

The following code snippet creates an ORB object for Application. The parameter args represents the parameters provided by the MAIN method of the Application. Since the property specifies the ORB class as SomeorbImplement, the new ORB will initialize the ORB implementation. If P is NULL, and the parameter does not specify the ORB class, the new ORB will be initialized using the default Java IDL.

* Properties P = New Properties ();

* P.PUT ("Org.OMG.CORBA.ORBCLASS", "SomeorbImplement"); * orb = orb.init (args, p);

The following code snippet provides an Applet to create an ORB object as the first parameter. If the applet does not provide an ORB class, the new ORB will use the default Java IDL to initialize.

* Orb = orb.init (myapplet, null);

*

An Application or Applet can be initialized in one or more ORBs. ORB initialization is just the beginning of the Corba world.

About author

Cocia Lin (cocia@163.com) is a programmer. He has a bachelor's degree, now specializing in Java related technologies, just starting to toss in the computer field.

转载请注明原文地址:https://www.9cbs.com/read-5931.html

New Post(0)