A factory for, and manager of,
Admin
s. This class will create admins for services based on the value of a
serviceName
string. References to these admins are retained in a table; methods exist for accessing these admins, destroying individual services, and destroying all services.
This manager includes explicit support for managing a 'global' shared activatable group and a 'global' shared non-activatable group. If this manager is used to create a a SharedGroupAdmin
or a NonActivatableGroupAdmin
, the manager will retain a reference to it. Once a shared group is created, all services managed by this class will be registered to run in the appropriate group. If the manager was already maintaining a group, the new group replaces the current group. If this manager is never called to manage a shared group, then each service must create a group of it's own.
If the test is distributed then the admin created for an activatable or non-activatable service may be a RemoteServiceAdmin, and the start method of this admin will cause the service to be started on a host other than the test host.
The type of admin returned by the getAdmin
methods is based on the value of the service property named type
. Specifically:
- if
type
has the value "group"
, then a SharedGroupAdmin
is returned. A reference to the groups admin is maintained and passed to the constructor of any subsequently created ActivatableServiceStarterAdmin
s. - if
type
has the value "nonactivatablegroup"
a NonActivatableGroupAdmin
is returned. A reference to the groups admin is maintained and passed to the constructor of any subsequently created NonActivatableServiceStarterAdmin
s. - if
type
has the value "rmid"
or "phoenix"
, then an ActivationSystemAdmin
is returned - if
type
has the value "classServer"
then a ClassServerAdmin
is returned. - if
type
has the value "running"
then a RunningServiceAdmin
is returned. - if
type
has the value "persistent"
or "transient"
then a NonActivatableServiceStarterAdmin
is returned if the service is to be run on the local host, or a RemoteServiceAdmin
is returned if the service is to be run on a different host. See QAConfig.getServiceHost
for details about the host selection policy. If a remote admin is returned, the service started on the remote system will be of the appropriate persistent/transient type. - if
type
is undefined or has the value "activatable"
then an ActivatableServiceStarterAdmin
is returned if the service is to be run on the local host, or a RemoteServiceAdmin
is returned if the service is to be run on a different host. See QAConfig.getServiceHost
for details about the host selection policy. If a remote admin is returned, the service started on the remote system will be activatable. - if none of these conditions are satisfied, a
TestException
is thrown.
The logger named
com.sun.jini.qa.harness.service
is used to log debug information
Level | Description |
FINE | to log starting a service, to log destroying a service, result (or problem) calling destroy |