|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jcsp.net.ServiceManager
public class ServiceManager
An instance of the ServiceManager
is created by the Node when
it is initialized. This reference can be obtained from the Node
class.
The class allows the local Node's services to be installed and started. The class does not currently allow services to removed. Services can be stopped by obtaining their reference and stopping them directly.
Constructor Summary | |
---|---|
ServiceManager()
|
Method Summary | |
---|---|
Service |
getService(String name)
Returns the Service object of the service with the specified name. |
String[] |
getServiceNames()
Returns an array containing an array of String objects which represent the names of the currently installed services. |
boolean |
installService(ServiceSettings settings,
Class serviceClass)
Installs a service as specified by its class and a set of settings. |
boolean |
installService(Service service,
String name)
Installs a Service object as a service in this
ServiceManager . |
boolean |
startService(String name)
Starts the service with the specified name. |
boolean |
uninstallService(String name)
This method allows a service that is not running to be uninstalled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceManager()
Method Detail |
---|
public boolean installService(ServiceSettings settings, Class serviceClass)
settings
- the settings for the service.serviceClass
- the Class
object of the class of the service to install.
true
iff the service has successfully been installed.public boolean installService(Service service, String name)
Service
object as a service in this
ServiceManager
. The name of the service must be supplied.
service
- the Service
object to install.name
- the name of the service.
true
iff the service has been successfully installed.public boolean startService(String name)
name
- the name of the service to start.
true
iff the service has been successfully started.public boolean uninstallService(String name)
This method allows a service that is not running to be uninstalled.
A running service can be uninstalled by obtaining the service
reference, calling its stop()
method and then
calling this method with the service's name.
name
- the name of the service to uninstall.
true
iff the service has been uninstalled.public Service getService(String name)
Returns the Service
object of the service with the specified name.
name
- the name of the service
Service
object of the service with the specified name.public String[] getServiceNames()
String
service names.
|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |