VisiBroker for Java

com.inprise.vbroker.Activation
Interface OADOperations

All Known Subinterfaces:
OAD

public interface OADOperations

Provides access to the Object Activation Daemon (OAD). It is used by the administration tools to list, register, and unregister objects. It is also used by client code for programmatic administration of the OAD.

The IDL for the OAD interface -

    interface OAD {
        CreationImplDef create_CreationImplDef();
        Object reg_implementation(in extension::CreationImplDef impl)
            raises(DuplicateEntry,InvalidPath);
        CreationImplDef get_implementation(in CORBA::RepositoryId repId,
            in string object_name) raises(NotRegistered);
        void change_implementation(in extension::CreationImplDef old_info,
            in extension::CreationImplDef new_info) raises(NotRegistered,InvalidPath,IsActive);
        attribute boolean destroy_on_unregister;
        void unreg_implementation(in CORBA::RepositoryId repId, 
            in string object_name) raises(NotRegistered);
        void unreg_interface(in CORBA::RepositoryId repId) raises(NotRegistered);
        void unregister_all();
        ImplementationStatus get_status(in CORBA::RepositoryId repId,
            in string object_name) raises(NotRegistered);
        ImplStatusList get_status_interface(in CORBA::RepositoryId repId)
            raises(NotRegistered);
        ImplStatusList get_status_all();
        Object lookup_interface(in CORBA::RepositoryId repId,
            in long timeout) 
            raises(NotRegistered, FailedToExecute, NotResponding, Busy);
        Object lookup_implementation(in CORBA::RepositoryId repId,
            in string object_name, in long timeout)
            raises(NotRegistered, FailedToExecute, NotResponding, Busy);
        CreationImplDef boa_activate_obj(in Object obj,
            in string repository_id, in long unique_id)
            raises(NotRegistered);
        void boa_deactivate3_obj(in Object obj,
                in string repository_id
                in long unique_id) raises(NotRegistered);
        string generated_command(in extension::CreationImplDef impl);
        string generated_environment(inextension::CreationImplDef impl);
    };
        


Method Summary
 CreationImplDef boa_activate_obj(Object obj, java.lang.String repository_id, int unique_id)
          Invoked implicitly when the spawned process calls BOA::obj_is_ready.
 void boa_deactivate_obj(Object obj, java.lang.String repository_id, int unique_id)
          Invoked implicitly when the spawned process deactivates an object (on which obj_is_ready was previously called).
 void change_implementation(CreationImplDef old_info, CreationImplDef new_info)
          Dynamically changes an object's implementation details.
 CreationImplDef create_CreationImplDef()
          Creates an empty CreationImplDef
 boolean destroy_on_unregister()
          Indicates if the OAD should destroy any spawned processes upon unregistration of the implementation.
 void destroy_on_unregister(boolean arg0)
          Indicates if the OAD should destroy any spawned processes upon unregistration of the implementation.
 java.lang.String generated_command(CreationImplDef impl)
          Returns the command-line that will be executed for a given implementation.
 java.lang.String generated_environment(CreationImplDef impl)
          Returns the environment in which the spawned server is executed for a given implementation.
 CreationImplDef get_implementation(java.lang.String repId, java.lang.String object_name)
          Retrieves the registration information for the specified implementation.
 ImplementationStatus[] get_status_all()
          Returns the status information for all registrations with the OAD.
 ImplementationStatus[] get_status_interface(java.lang.String repId)
          Returns status information for all implementations with the given repository id.
 ImplementationStatus get_status(java.lang.String repId, java.lang.String object_name)
          Returns status information for the given implementation, identified by the provided repository id and object name.
 Object lookup_implementation(java.lang.String repId, java.lang.String object_name, int timeout)
          Returns the Object reference for an implementation with the given RepositoryId and object name.
 Object lookup_interface(java.lang.String repId, int timeout)
          Returns the Object reference for an implementation with the given RepositoryId.
 Object reg_implementation(CreationImplDef impl)
          Registers an implementation with the OAD and the VisiBroker directory service.
 void unreg_implementation(java.lang.String repId, java.lang.String object_name)
          Unregisters implementations identified by the repository id and object name.
 void unreg_interface(java.lang.String repId)
          Unregisters all implementations having the given repository id.
 void unregister_all()
          Unregisters all implementations with the OAD.
 

Method Detail

generated_environment

java.lang.String generated_environment(CreationImplDef impl)
Returns the environment in which the spawned server is executed for a given implementation. This call returns a string.

Parameters:
impl - the registered implementation.

generated_command

java.lang.String generated_command(CreationImplDef impl)
Returns the command-line that will be executed for a given implementation.

Parameters:
impl - the registered implementation.

boa_deactivate_obj

void boa_deactivate_obj(Object obj,
                        java.lang.String repository_id,
                        int unique_id)
                        throws NotRegistered
Invoked implicitly when the spawned process deactivates an object (on which obj_is_ready was previously called). 'unique_id' is the same identifier used for the invocation of boa_activate_obj.

Parameters:
obj - A string containing an object name.
repository_id - A string containing a repository identifier.
unique_id - The identifier used when the boa_activate_obj was invoked.
Throws:
NotRegistered

boa_activate_obj

CreationImplDef boa_activate_obj(Object obj,
                                 java.lang.String repository_id,
                                 int unique_id)
                                 throws NotRegistered
Invoked implicitly when the spawned process calls BOA::obj_is_ready. This method does not need to be invoked directly by the client. 'unique_id' will be 0 if the application is started manually

Throws:
NotRegistered

lookup_implementation

Object lookup_implementation(java.lang.String repId,
                             java.lang.String object_name,
                             int timeout)
                             throws NotRegistered,
                                    FailedToExecute,
                                    NotResponding,
                                    Busy
Returns the Object reference for an implementation with the given RepositoryId and object name. The timeout is treated in the same fashion as in the lookup_interface call.

Parameters:
repId - A string containing the repository id.
object_name - A string containing the object name.
Throws:
NotRegistered
FailedToExecute
NotResponding
Busy

lookup_interface

Object lookup_interface(java.lang.String repId,
                        int timeout)
                        throws NotRegistered,
                               FailedToExecute,
                               NotResponding,
                               Busy
Returns the Object reference for an implementation with the given RepositoryId. A new process may be spawned in response to the request. 'timeout' specifies how long to wait for a spawned process to activate an implementation of the requested repId. A value of -1 indicates that the OAD should use its default timeout

Parameters:
repId - A string containing the repository id.
timeout - The mamimum time to wait for activation of spawned process.
Throws:
NotRegistered
FailedToExecute
NotResponding
Busy

get_status_all

ImplementationStatus[] get_status_all()
Returns the status information for all registrations with the OAD.


get_status_interface

ImplementationStatus[] get_status_interface(java.lang.String repId)
                                            throws NotRegistered
Returns status information for all implementations with the given repository id.

Parameters:
repId - A string containing the repository id.
Throws:
NotRegistered

get_status

ImplementationStatus get_status(java.lang.String repId,
                                java.lang.String object_name)
                                throws NotRegistered
Returns status information for the given implementation, identified by the provided repository id and object name.

Parameters:
repId - A string containing the repository id.
object_name - A string containing the object name.
Throws:
NotRegistered

unregister_all

void unregister_all()
Unregisters all implementations with the OAD. Unless 'destroy_on_unregister' is set to true, all active implementations continue to execute.


unreg_interface

void unreg_interface(java.lang.String repId)
                     throws NotRegistered
Unregisters all implementations having the given repository id. If the 'destroy_on_unregister' attribute is true, this method will cause the termination of all active processes that implement the specified repId.

Parameters:
repId - A string containing the repository id.
Throws:
NotRegistered

unreg_implementation

void unreg_implementation(java.lang.String repId,
                          java.lang.String object_name)
                          throws NotRegistered
Unregisters implementations identified by the repository id and object name. If the 'destroy_on_unregister' attribute is true, this method will cause the destruction of all processes currently implementing the specified repId/object_name

Parameters:
repId - A string containing the repository id.
object_name - A string containing the object name.
Throws:
NotRegistered

destroy_on_unregister

boolean destroy_on_unregister()
Indicates if the OAD should destroy any spawned processes upon unregistration of the implementation. Default value of this attribute is 'false'.


destroy_on_unregister

void destroy_on_unregister(boolean arg0)
Indicates if the OAD should destroy any spawned processes upon unregistration of the implementation. Default value of this attribute is 'false'.


change_implementation

void change_implementation(CreationImplDef old_info,
                           CreationImplDef new_info)
                           throws NotRegistered,
                                  InvalidPath,
                                  IsActive
Dynamically changes an object's implementation details. This method can be used to change the registration's activation policy, path name, argument settings, and environment settings.

It is an error to change the registration information for a currently active implementation. The IsActive call may be used to check if an implemenation is active.
Caution: Be sure to exercise caution when changing an object's implementation name and object name with this method. Doing so will prevent client applications from locating the object with the old name.

Parameters:
old_info - The registration information to be replaced.
new_info - The new registration information.
Throws:
NotRegistered
InvalidPath
IsActive

get_implementation

CreationImplDef get_implementation(java.lang.String repId,
                                   java.lang.String object_name)
                                   throws NotRegistered
Retrieves the registration information for the specified implementation.

Parameters:
repId - A string containing a repository identifier.
object_name - A string containing an object name.
Throws:
NotRegistered

reg_implementation

Object reg_implementation(CreationImplDef impl)
                          throws DuplicateEntry,
                                 InvalidPath
Registers an implementation with the OAD and the VisiBroker directory service.

Parameters:
impl - instance of CreationImplDef being used to register the implementation
Throws:
DuplicateEntry - entry already exists
InvalidPath - server class or executable not found

create_CreationImplDef

CreationImplDef create_CreationImplDef()
Creates an empty CreationImplDef


Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online