Netscape Internet Service Broker for C++ Reference Guide

[Contents] [Previous] [Next]

Chapter 1
Commands

This chapter covers commands used for creating, executing, and managing applications developed with Netscape Internet Service Broker for C++ (ISB for C++). It includes the following major sections:

General Information

For Windows users, to view options for a command, enter:

command name -?

For example: orbeline -?

For UNIX users, to view options for a command, enter:

command name -\?

For example: orbeline -\?

idl2ir

This command allows you to populate an interface repository with objects defined in an Interface Definition Language source file.

Description

The idl2ir command takes an IDL file as input, binds itself to an interface repository server, and populates the repository with the IDL constructs contained in infile. If the repository already contains an item with the same name as an item in the IDL file, the old item is replaced.

NOTE: The idl2ir command does not handle anonymous arrays or sequences properly. To work around this problem, typedefs must be used for all sequences and arrays.

Example:

          idl2ir -R my_repository library/lib.idl

irep

This command starts an interface repository server.

Description

The irep command starts an interface repository server that manages a database containing detailed descriptions of IDL interfaces. The repository's database includes interface names, inheritance structure, supported operations, and arguments. The interface repository can consist of multiple databases and can be loaded using the idl2ir command. Applications can bind to and query the interface repository using the Repository class.

Example:

          irep my_server

listimpl

This command allows you to list all ORB object implementations registered with the Object Activation Daemon.

Description

This command lists information in the OAD's implementation repository. The information for each object includes:

For UNIX, if interface_name is specified, only information for that ORB object is displayed; otherwise all ORB objects registered with the OAD and their information is displayed.

The implementation repository files are assumed to reside in the impl_dir subdirectory whose path is defined by the ORBELINE environment variable. A different directory name can be set using the ORBELINE_IMPL_NAME environment variable. The path to this directory can be changed using the ORBELINE_IMPL_PATH environment variable.

Example:

          listimpl -i Library

oad

This command starts the Object Activation Daemon

Description

Each object that is to be activated automatically must register its implementation with the OAD. When an object is registered with the OAD, ISB for C++ is notified that the object exists. When a client application binds to such an object, ISB for C++ locates the object and returns the OAD with which the object was registered. ISB for C++ then negotiates with the OAD to activate the requested object. This activation process is transparent to the application program.

Example:

          oad -v

orbeline

This command implements ORBeline's IDL to C++ compiler.

Description

This command takes IDL files as input and generates the corresponding C++ classes for the client and server side, as well as client stubs and server skeleton code.

Example:

          orbeline -h hx -m _serv -S tie -S excepspec lib.idl

Argument Description
-o dir

Directs output to the directory specified by dir.

-I dir

Adds the specified directory name to the beginning of the search path for include files that do not begin with a "/" character.

-D name

Defines the specified name just as though it had been defined with a #define directive specifying a value of 1.

-D name=def

Defines the specified name just as though it had been defined using the #define directive.

-U name

Removes the initial definition of the specified name, where name is a symbol that is predefined.

-h header_suffix

Sets the suffix for include files generated by the IDL compiler. The suffix ".hh" is used by default.

-c source_suffix

Sets the suffix for source files generated by the IDL compiler. The suffix ".cc" is used by default.

-m implementor_suffix

Sets the suffix for server-side files generated by the IDL compiler. The suffix "_server" is used by default for Unix platforms. The suffix "_s" is used by default for Windows platforms.

-v invoker_suffix

Sets the suffix for client-side files generated by the IDL compiler. The suffix "_client" is used by default for Unix platforms. The suffix "_c" is used by default on Windows platforms.

-G stdstream

Generate operators for writing objects to and reading objects from a stream. These operators can be used to write the objects to stdout or a file. This option is ON by default.

-G container

Generate methods for placing ORB objects into containers. These methods include compare, hash, and assignment operators. This option is ON by default.

-G excepspec

Generate exception specification code. For each method defined, the list of exceptions which it can throw are specified as part of the method declaration This option is ON by default.

-G exceptions

Generate code that uses native C++ language exceptions. This option is ON by default.

-G tie

Generate code to enable the tie or delegation mechanism to be used. This option is ON by default.

-S stdstream

Suppress the generation of class stream operators.

-S container

Suppress the generation of code that places ORB objects into containers.

-S excepspec

Suppress the generation of exception specification code.

-S exceptions

Suppress the generation of code that uses native C++ language exceptions.

-S tie

Suppress the generation of code that enables the tie or delegation mechanism.

-t

Generate typecodes for interfaces and types defined in IDL.

-u

Prints a usage message.

-?

Prints a usage message.

regobj

This command allows you to register one or more ORB object implementations with the Object Activation Daemon. For more information on the OAD, see page 1-7 in this guide.

Description

If the OAD is running, this command registers one or more ORB objects with the Object Activation Daemon. Once registered, these objects can be activated automatically by the OAD when a client requests to bind to the object. Also, ISB for C++ is notified that the objects are available through the OAD. The object's implementation is also added to ISB for C++'s implementation repository.

NOTE: If an object implementation is started manually as a persistent server, it does not need to be registered with the OAD.

Example:

          regobj -o Library,Harvard -f lib_server -p shared 

Server Activation Policies

shared

Multiple objects of a given implementation share the same server.

unshared

Only one object of a given implementation can be active in a server at one time. If multiple clients wish to bind to the same object implementation, a separate server is activated for each client application. A server exits when its client application disconnects or exits.

per-method

Each invocation of a method results in a new server being activated. The server exits when the method invocation completes.

unregobj

This command unregisters ORB objects registered with the Object Activation Daemon. For more information on the OAD, see page 1-7 in this guide.

Description

This command unregisters one or more ORB objects with the Object Activation Daemon. Once an object is unregistered, it can no longer be activated automatically by the OAD when a client requests the object. ORB objects being unregistered must have been previously registered using the regobj command, described on page 1-12 in this guide.

If you specify only an interface name, all ORB objects with that interface that are registered with the OAD will be unregistered. Alternatively, you can specifically identify an ORB object by its interface name and object name.

NOTE: If an object implementation is started manually as a persistent server, it does not need to be registered with the OAD.

Example:

          unregobj -o Library,Harvard

Example:

          unregobj -i Library

Windows Implementation of Commands

This section shows the Windows implementation of the following commands.

For more detailed information about a command, see the corresponding section earlier in this chapter.

listimpl

In Windows 95 or Windows NT, you list registered objects by launching the ORBeline Registry icon first and then selecting List in the menu bar. The following screen appears:

This window lists the interfaces that are registered with the object activation daemon on your computer. By selecting one of the interfaces and clicking on Browse, you can view the object(s) implementing that interface that are also registered with the activation daemon. The following screen appears:

If you want to view information about this object or unregister it, click Display. The following sample of the screen appears:

To unregister an object, click on Unregister.

regobj

In Windows 95 or Windows NT, you start the object registration command by typing regobj at the command line or launching the ORBeline Registry icon. The following screen appears:

You can register an object by selecting Register from the menu bar. The following sample of the screen appears:

The following table describes the fields in this dialog box.

Field

Description

Interface Name

Required. Enter the name of the object's IDL interface.

Object Name

Required. Enter the name of the object you want to register.

Server Filename

Required. Enter the name of a file to execute when the object you are registering is activated.

Activation Policy

Optional. Defaults to Shared Server. For more information about activation policies, see Server Activation Policies in the command section under regobj.

Arguments

Optional. Enter the arguments, if any, that should be passed to the executable at startup time. These arguments are separated by commas.

Environment

Optional. Enter a list of environment variables, separated by commas, and their entries. For example: ORBELINE=c:orbeline,LIB=c:orblib.

Reference Data

Optional. Enter any application specific data relevant to this application. At runtime, each object can query the Basic Object Adaptor (BOA) for reference data.

unregobj

In Windows 95 or Windows NT, you unregister objects by displaying the information about an object. To learn how to display information about an object, see the Windows information for listimpl.


[Contents] [Previous] [Next]

Last Updated: 02/03/98 17:13:12


Copyright © 1997 Netscape Communications Corporation

Any sample code included above is provided for your use on an "AS IS" basis, under the Netscape License Agreement - Terms of Use