Package org.jcsp.net
Interface Service
- All Known Subinterfaces:
SecurityService
- All Known Implementing Classes:
CNS,CNSService,DynamicClassLoader,SimpleSecurityAuthority
public interface Service
An interface that should be implemented by classes that are intended to be Node level JCSP.NET services.
Services should be initialized, then started and then stopped.
-
Method Summary
Modifier and TypeMethodDescriptionObtains aServiceUserObjectfrom a Service.booleaninit(ServiceSettings settings) Initialize the service with the specified service settings.booleanIndicates whether or not a service is running.booleanstart()This should start the service when called and return.booleanstop()Should stop the service and then return.
-
Method Details
-
start
boolean start()This should start the service when called and return.- Returns:
trueiff the service has successfully started.
-
stop
boolean stop()Should stop the service and then return.- Returns:
trueiff the service has successfully stopped.
-
init
Initialize the service with the specified service settings.- Parameters:
settings- The settings used by the service.- Returns:
trueiff the service has been initialized.
-
isRunning
boolean isRunning()Indicates whether or not a service is running.- Returns:
trueiff the service is currently running.
-
getUserObject
Obtains aServiceUserObjectfrom a Service. This allows Services to expose functionality to users that it does not want to be able to access admin features.- Returns:
- a
ServiceUserObject. - Throws:
SecurityException- if the calling Thread does not have access to the object.
-