|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jini.compat.admin2.ServiceStarterAdmin
This class implements the BasicServiceAdmin and BasicLookupAdmin
interfaces to automate the testing of any activatable program that can be
started by the ServiceStarter framework. See the start method
documentation for config file properties supported by this Admin.
| Field Summary | |
protected SharedActivatableServiceDescriptor.Created |
activatableCreated
|
protected Config |
compatConfig
|
protected SysConfig |
compatSysConfig
|
protected java.rmi.activation.ActivationGroupID |
groupCreated
|
protected java.lang.String |
groupLog
|
protected java.io.PrintWriter |
log
|
protected NonActivatableServiceDescriptor.Created |
nonActivatableCreated
|
protected java.lang.Object |
proxy
|
protected SharedActivatableServiceDescriptor.Created |
sharedCreated
|
| Fields inherited from interface com.sun.jini.compat.harness.BasicServiceAdmin |
CATEGORY |
| Fields inherited from interface com.sun.jini.compat.harness.BasicLookupAdmin |
CATEGORY |
| Constructor Summary | |
ServiceStarterAdmin()
Default constructor. |
|
| Method Summary | |
java.net.InetAddress |
getAddress()
Returns the address of the host the program is running on by looking up the property com.sun.jini.compat.defaultAdmin.address. |
java.lang.String |
getGroupLog()
Returns a randomized directory name within the com.sun.jini.compat.scratchDir that can be used
as the group log directory. |
java.lang.String |
getPersistenceDir()
Returns a randomized directory name within the com.sun.jini.compat.scratchDir that can be used
as the program's persistence directory. |
ServiceRegistrar |
getServiceRegistrar()
Returns the proxy for the lookup service being tested. |
ServiceTemplate |
getTemplate()
Returns a fully wild-carded template. |
ServiceItem |
pickService(ServiceItem[] services)
Given a list of objects which are ServiceItems this method determines if any of them are the program we are testing. |
void |
setConfig(Config config)
Takes the Config object for this test run so that the implementation can get access to property files and other config information. |
void |
start()
Using the ServiceStarter, starts the program(s)
specified in the service starter configuration file specified
by the property com.sun.jini.compat.admin2.starterConfig. |
void |
stop()
Stops the program. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Config compatConfig
protected SysConfig compatSysConfig
protected java.io.PrintWriter log
protected NonActivatableServiceDescriptor.Created nonActivatableCreated
protected SharedActivatableServiceDescriptor.Created sharedCreated
protected SharedActivatableServiceDescriptor.Created activatableCreated
protected java.rmi.activation.ActivationGroupID groupCreated
protected java.lang.Object proxy
protected java.lang.String groupLog
| Constructor Detail |
public ServiceStarterAdmin()
| Method Detail |
public void setConfig(Config config)
setConfig in interface BasicAdminconfig - the configuration object
public java.net.InetAddress getAddress()
throws java.rmi.RemoteException
getAddress in interface BasicAdminjava.rmi.RemoteException
public void start()
throws java.rmi.RemoteException
ServiceStarter, starts the program(s)
specified in the service starter configuration file specified
by the property com.sun.jini.compat.admin2.starterConfig.
The following strings are passed to this configuration as overrides:
com.sun.jini.compat.admin2.jskHome=
<value of com.sun.jini.compat.admin2.jskHome system property>
com.sun.jini.compat.admin2.javaHome=
<value of com.sun.jini.compat.admin2.javaHome system property>
com.sun.jini.compat.admin2.groupLog=
<return value of getGroupLog() method call>
com.sun.jini.compat.admin2.policyDir=
<value of the com.sun.jini.compat.admin2.policyDir
system property or, if null, the value of
com.sun.jini.compat.installDir property + "/policy">
com.sun.jini.compat.admin2.persistenceDir=
<return value of getPersistenceDir() method call>
com.sun.jini.compat.admin2.host=
<return value of getAddress().getHostName() method call>
configs sub-directory
of the LDJ Kit. The *-activatable.config files
are used by this Admin to test services in the Jini starter kit.
start in interface BasicAdminjava.rmi.RemoteException
public void stop()
throws java.rmi.RemoteException
net.jini.admin.Administrable and
com.sun.jini.admin.DestroyAdmin
then this method will make certain the program is
unregistered with the activation system before returning.
stop in interface BasicAdminjava.rmi.RemoteException
public ServiceItem pickService(ServiceItem[] services)
throws java.rmi.RemoteException
service field of each
ServiceItem to the program's proxy returned from
the ServiceStarter framework when the program was started.
pickService in interface BasicServiceAdminservices - the array of ServiceItems that need to be picked from
java.rmi.RemoteException
public ServiceTemplate getTemplate()
throws java.rmi.RemoteException
getTemplate in interface BasicServiceAdminjava.rmi.RemoteException
public ServiceRegistrar getServiceRegistrar()
throws java.rmi.RemoteException
getServiceRegistrar in interface BasicLookupAdminjava.rmi.RemoteExceptionpublic java.lang.String getGroupLog()
com.sun.jini.compat.scratchDir that can be used
as the group log directory. The returned directory name
is saved so that this Admin can remove it later.
public java.lang.String getPersistenceDir()
com.sun.jini.compat.scratchDir that can be used
as the program's persistence directory.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||