Public Member Functions | |
AcsManagerProxy (String managerLoc, ORB orb, Logger logger) | |
synchronized Manager | getManager () throws AcsJContainerEx |
synchronized void | loginToManager (Client managerClient, boolean keepTrying) throws AcsJContainerEx |
boolean | pingManager (long timeoutMillis) |
synchronized void | logoutFromManager () |
ComponentInfo[] | get_component_info (int[] componentHandles, String name_wc, String type_wc, boolean active_only) throws AcsJNoPermissionEx |
Object | get_service (String service_url, boolean activate) throws AcsJComponentNotAlreadyActivatedEx, AcsJCannotGetComponentEx, AcsJComponentConfigurationNotFoundEx, AcsJNoPermissionEx |
Object | get_component (int clientHandle, String component_url, boolean activate) throws AcsJCannotGetComponentEx, AcsJComponentNotAlreadyActivatedEx, AcsJComponentConfigurationNotFoundEx, AcsJNoPermissionEx |
Object | get_component_non_sticky (int clientHandle, String component_url) throws AcsJCannotGetComponentEx, AcsJComponentNotAlreadyActivatedEx, AcsJNoPermissionEx |
Object | getComponentNonSticky (int clientHandle, String component_url) throws AcsJComponentNotAlreadyActivatedEx, AcsJCannotGetComponentEx, AcsJNoPermissionEx |
ComponentInfo | get_default_component (int clientHandle, String componentIDLType) throws AcsJNoDefaultComponentEx, AcsJCannotGetComponentEx, AcsJNoPermissionEx |
ComponentInfo | get_dynamic_component (int clientHandle, ComponentSpec c, boolean mark_as_default) throws AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx, AcsJCannotGetComponentEx, AcsJNoPermissionEx |
ComponentInfo | get_collocated_component (int clientHandle, ComponentSpec c, boolean mark_as_default, String target_component_url) throws AcsJIncompleteComponentSpecEx, AcsJInvalidComponentSpecEx, AcsJComponentSpecIncompatibleWithActiveComponentEx, AcsJCannotGetComponentEx, AcsJNoPermissionEx |
int | register_component (String component_url, String type, Object component) throws AcsJCannotRegisterComponentEx, AcsJNoPermissionEx |
int | release_component (int clientHandle, String component_url) throws AcsJNoPermissionEx |
int | force_release_component (int clientHandle, String curl) throws AcsJNoPermissionEx |
int | getManagerHandle () |
void | shutdownNotify () |
AcsManagerProxy | createInstance () |
Static Public Member Functions | |
String | getLocalManagerCorbaloc () |
Protected Member Functions | |
void | activateReloginToManagerIfDisconnected () |
void | handleRuntimeException (RuntimeException exc) |
Protected Attributes | |
java.lang.Object | connectorLock = new java.lang.Object() |
final Thread | connectorThread |
Package Functions | |
boolean | isLoggedIn (boolean checkPing) |
Private Member Functions | |
synchronized void | findManager (String managerLoc, boolean keepTrying) throws AcsJContainerEx |
synchronized void | loginToManager (boolean keepTrying) throws AcsJContainerEx |
Private Attributes | |
Manager | m_manager |
String | m_managerLoc |
int | m_mgrHandle = 0 |
ORB | m_orb |
Logger | m_logger |
volatile boolean | m_shuttingDown |
Client | m_managerClient |
This class is stateful, so there must be one AcsManagerProxy
used per client if a process has more than one client to the manager.
Warning: This class is not supposed to be instantiated by components and other non-framework classes. Components should only access this class through ContainerServices
.
|
Constructor stores parameters, but takes no further action.
|
|
|
|
Creates a new instance, using the same manager, orb and logger. The new instance can then be used to log in to the manager (again) independently of this instance. There is no communication between this instance and the new instance. For example, a call to shutdownNotify() will not be forwarded. |
|
Finds the Manger using the supplied
|
|
Calls ManagerOperations#force_release_component(int, String). This call must not be used by regular component code. It is only provided for setting up tests, writing specialized operator tools, and similar purposes.
|
|
Encapsulates si.ijs.maci.ManagerOperations#get_collocated_component(int, si.ijs.maci.ComponentSpec, boolean, java.lang.String).
|
|
The more restricted version of get_service, only good for getting components.
|
|
From maci IDL comments: "Gets all the information that the Manager has about components. To invoke this method, the caller must have INTROSPECT_MANAGER access rights, or it must have adequate privileges to access the component (the same as with the get_service method). Information about all components is returned, unless the active_only parameter is set to True, in which case only information about those components that are currently registered with the Manager and activated is returned. Calling this function does not affect the internal state of the Manager."
|
|
|
|
|
|
|
|
From maci IDL comments: Gets a service, activating it if necessary (components). The client represented by id (the handle) must have adequate access rights to access the service. This is untrue of components: components always have unlimited access rights to other components."
|
|
Gets a component as a "weak client" who does not prevent component unloading in case the other real clients release their references. Otherwise similar to
|
|
|
|
Gets the ACS Manager, either cached or freshly retrieved. Note that no login is done here, so call loginToManager(Client, boolean) after this.
|
|
Returns the handle that the ACS Manager has assigned to this client. This handle is kept inside the Manager proxy class, but applies to the whole container.
|
|
Invoked by the manager methods on failure. The "handling" of the exception refers to changing the connection status, logging the exception, etc. This method will not throw the given exception, which means that the calling client has to do this herself. |
|
|
|
Logs in to the Manager. Only to be called from within this class (see connectorThread), when the
|
|
Logs in to the manager, using the provided manager client CORBA object. This method only returns when the login succeeded. Otherwise an exception is thrown.
|
|
Logs out from the manager. If this fails, a warning is logged, but no exception will be thrown by this method. |
|
Pings the manager. Uses a separate thread so that life can go on if the manager does not respond, and the ORB timeout is too long for this purpose.
Currently calls
|
|
From maci IDL comments: "Registers a CORBA object as a component, assigning it a CURL and making it accessible through the Manager. The component is treated as an immortal component."
|
|
From maci IDL comments: "Releases a component. In order for this operation to be possible, the caller represented by the id must have previously successfuly requested the component via a call to get_service(String, boolean, IntHolder). Releasing a component more times than requesting it should be avoided, but it produces no errors."
|
|
Notification that the container is in the process of shutting down. With ACS 7.0.2 this method is no longer synchronized because it deadlocked the shutdown hook thread when the manager proxy was in a login loop. See COMP-2602. |
|
The lock should only be held for short periods, the threads executing our API need to be able to retrieve it quickly. TODO: replace with lock from concurrent lib |
|
This thread keeps retrying to log in to the manager. Before each attempt, it checks whether some outside-world caller of loginToManager() has meanwhile accomplished to log in. notify() on the lock will awake the thread, interrupt() will terminate the thread. msc(2005-07) |
|
|
|
|
|
msc(2005-07) client:managerproxy is always 1:1 |
|
|
|
|
|
|
|
|