CSP for Java
(JCSP) 1.1-rc4

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.

Author:
Quickstone Technologies Limited

Method Summary
 ServiceUserObject getUserObject()
          Obtains a ServiceUserObject from a Service.
 boolean init(ServiceSettings settings)
          Initialize the service with the specified service settings.
 boolean isRunning()
          Indicates whether or not a service is running.
 boolean start()
          This should start the service when called and return.
 boolean stop()
          Should stop the service and then return.
 

Method Detail

start

boolean start()
This should start the service when called and return.

Returns:
true iff the service has successfully started.

stop

boolean stop()
Should stop the service and then return.

Returns:
true iff the service has successfully stopped.

init

boolean init(ServiceSettings settings)
Initialize the service with the specified service settings.

Parameters:
settings - The settings used by the service.
Returns:
true iff the service has been initialized.

isRunning

boolean isRunning()
Indicates whether or not a service is running.

Returns:
true iff the service is currently running.

getUserObject

ServiceUserObject getUserObject()
                                throws SecurityException
Obtains a ServiceUserObject from 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.

CSP for Java
(JCSP) 1.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.