jp.go.aist.rtm.RTC
Class ManagerServant

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by RTM.ManagerPOA
          extended by jp.go.aist.rtm.RTC.ManagerServant
All Implemented Interfaces:
org.omg.CORBA.portable.InvokeHandler, ManagerOperations

public class ManagerServant
extends ManagerPOA

Manager CORBA class

This class changes Manager to CORBA Servant. Generation/deletion of the component, to get the state of the system, etc. can be done from the outside.


Field Summary
protected  Logbuf rtcout
           Logger stream
 
Constructor Summary
ManagerServant()
           Constructor
 
Method Summary
 Manager _this()
           Gets CORBA object.
 ReturnCode_t add_master_manager(Manager mgr)
           Getting a master manager
 ReturnCode_t add_slave_manager(Manager mgr)
           Getting a slave manager
 RTObject create_component(java.lang.String module_name)
           Creating an RT-Component
 boolean createINSManager()
           {@.en Generate INSManager.
 ReturnCode_t delete_component(java.lang.String instance_name)
           Deleting an RT-Component
 Manager findManager(java.lang.String host_port)
           Find the reference of Manager. return Manager reference
 ReturnCode_t fork()
           The copy of the process is generated.
 ComponentProfile[] get_component_profiles()
           Getting RT-Component's profile list running on this manager
 RTObject[] get_components()
           Getting RT-Component list running on this manager
 NameValue[] get_configuration()
           Getting this manager's configuration.
 ModuleProfile[] get_factory_profiles()
           Getting component factory profiles
 ModuleProfile[] get_loadable_modules()
           Getting loadable module profiles
 ModuleProfile[] get_loaded_modules()
           Getting loaded module profiles
 Manager[] get_master_managers()
           Getting master managers
 ManagerProfile get_profile()
           Getting this manager's profile.
 org.omg.CORBA.Object get_service(java.lang.String name)
           Get the reference of RTC.
 Manager[] get_slave_managers()
           Getting slave managers
 Manager getObjRef()
           Get the reference of Manager.
 boolean is_master()
           Whether this manager is master or not
 ReturnCode_t load_module(java.lang.String pathname, java.lang.String initfunc)
           Loading a module
 ReturnCode_t remove_master_manager(Manager mgr)
           Removing a master manager
 ReturnCode_t remove_slave_manager(Manager mgr)
           Removing a slave manager
 ReturnCode_t restart()
           This method restarts RTC.
 ReturnCode_t set_configuration(java.lang.String name, java.lang.String value)
           Setting manager's configuration
 ReturnCode_t shutdown()
           This method shutdowns RTC.
 ReturnCode_t unload_module(java.lang.String pathname)
           Unloading a module
 
Methods inherited from class RTM.ManagerPOA
_all_interfaces, _invoke, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rtcout

protected Logbuf rtcout
Logger stream

Constructor Detail

ManagerServant

public ManagerServant()
Constructor

Method Detail

_this

public Manager _this()
Gets CORBA object.

Gets RTM.Manager object.

Overrides:
_this in class ManagerPOA
Returns:
RTM.Manager object.

createINSManager

public boolean createINSManager()
Generate INSManager.

Returns:
Successful:true, Failed:false

findManager

public Manager findManager(java.lang.String host_port)
Find the reference of Manager. return Manager reference


load_module

public ReturnCode_t load_module(java.lang.String pathname,
                                java.lang.String initfunc)
Loading a module

This operation loads a specified loadable module and perform initialization with the specified function.

Parameters:
pathname - A path to a loading module.
initfunc - Module initialization function.
Returns:
The return code.

unload_module

public ReturnCode_t unload_module(java.lang.String pathname)
Unloading a module

This operation unloads a specified loadable module.

Parameters:
pathname - A path to a loading module.
Returns:
The return code.

get_loadable_modules

public ModuleProfile[] get_loadable_modules()
Getting loadable module profiles

This operation returns loadable module profiles.

Returns:
A module profile list.

get_loaded_modules

public ModuleProfile[] get_loaded_modules()
Getting loaded module profiles

This operation returns loaded module profiles.

Returns:
A module profile list.

get_factory_profiles

public ModuleProfile[] get_factory_profiles()
Getting component factory profiles

This operation returns component factory profiles from loaded RT-Component module factory profiles.

Returns:
An RT-Component factory profile list.

create_component

public RTObject create_component(java.lang.String module_name)
Creating an RT-Component

This operation creates RT-Component according to the string argument.

Returns:
A created RT-Component

delete_component

public ReturnCode_t delete_component(java.lang.String instance_name)
Deleting an RT-Component

This operation delete an RT-Component according to the string argument.

Parameters:
instance_name - Instance name
Returns:
Return code

get_components

public RTObject[] get_components()
Getting RT-Component list running on this manager

This operation returns RT-Component list running on this manager.

Returns:
A list of RT-Components

get_component_profiles

public ComponentProfile[] get_component_profiles()
Getting RT-Component's profile list running on this manager

This operation returns RT-Component's profile list running on this manager.

Returns:
A list of RT-Components' profiles

get_profile

public ManagerProfile get_profile()
Getting this manager's profile.

This operation returns this manager's profile.

Returns:
Manager's profile

get_configuration

public NameValue[] get_configuration()
Getting this manager's configuration.

This operation returns this manager's configuration.

Returns:
Manager's configuration

set_configuration

public ReturnCode_t set_configuration(java.lang.String name,
                                      java.lang.String value)
Setting manager's configuration

This operation sets managers configuration.

Parameters:
name - A configuration key name to be set
value - A configuration value to be set
Returns:
Return code

is_master

public boolean is_master()
Whether this manager is master or not

It returns "True" if this manager is a master, and it returns "False" in other cases.

Returns:
A boolean value that means it is master or not.

get_master_managers

public Manager[] get_master_managers()
Getting master managers

This operation returns master manager list if this manager is slave. If this manager is master, an empty sequence would be returned.

Returns:
Master manager list

add_master_manager

public ReturnCode_t add_master_manager(Manager mgr)
Getting a master manager

This operation returns a master manager with specified id. If the manager with the specified id does not exist, nil object reference would be returned.

Returns:
A master manager

remove_master_manager

public ReturnCode_t remove_master_manager(Manager mgr)
Removing a master manager

This operation removes a master manager from this manager.

Parameters:
mgr - A master manager
Returns:
ReturnCode_t

get_slave_managers

public Manager[] get_slave_managers()
Getting slave managers

This operation returns slave manager list if this manager is slave. If this manager is slave, an empty sequence would be returned.

Returns:
Slave manager list

add_slave_manager

public ReturnCode_t add_slave_manager(Manager mgr)
Getting a slave manager

This operation add a slave manager to this manager.

Parameters:
mgr - A slave manager
Returns:
ReturnCode_t

remove_slave_manager

public ReturnCode_t remove_slave_manager(Manager mgr)
Removing a slave manager

This operation removes a slave manager from this manager.

Parameters:
mgr - A slave manager
Returns:
ReturnCode_t

fork

public ReturnCode_t fork()
The copy of the process is generated.

Returns:
ReturnCode_t

shutdown

public ReturnCode_t shutdown()
This method shutdowns RTC.

Returns:
ReturnCode_t

restart

public ReturnCode_t restart()
This method restarts RTC.

Returns:
ReturnCode_t

get_service

public org.omg.CORBA.Object get_service(java.lang.String name)
Get the reference of RTC.

Returns:
RTC reference

getObjRef

public Manager getObjRef()
Get the reference of Manager.

Returns:
Manager reference