i3.dragos.core
Interface Service

All Known Implementing Classes:
AbstractService, CommandService, DataSourceFactory, EventManager, RuleEngine, TransactionManagerFactory

public interface Service

A Service is a component of the DRAGOS database which is responsible for a certain task. Services may be optional or not!

Author:
Boris Boehlen <boehlen@cs.rwth-aachen.de>, Thorsten Hermes <thermes@i3.informatik.rwth-aachen.de>

Nested Class Summary
static class Service.Result
          Starting, stopping etc. of services can be successful or not.
static class Service.State
          A Service can be in different states.
 
Method Summary
 java.lang.String getName()
          Returns the name of the service.
 Service.State getState()
          Returns the state of the service.
 Service.Result initialize()
          Initializes the services.
 Service.Result resume()
          Tries to resume the execution of a service or a start a service which has been stopped before.
 Service.Result start()
          Tries to start the service.
 Service.Result stop()
          Tries to stop the service.
 Service.Result suspend()
          Tries to suspend the execution of a service.
 Service.Result uninitialize()
          Uninitializes the services and releases all resources used by the service.
 

Method Detail

getName

java.lang.String getName()
Returns the name of the service.

Returns:
the name of the service.

getState

Service.State getState()
Returns the state of the service.

Returns:
the state of the service.

initialize

Service.Result initialize()
Initializes the services.

Returns:
OK if the initialization was successful, FAILED if it was not and INVALID if the configuration was incorrect.

uninitialize

Service.Result uninitialize()
Uninitializes the services and releases all resources used by the service.

Returns:
OK if the uninitialization was successful, FAILED if it was not and INVALID if the configuration was incorrect.

start

Service.Result start()
Tries to start the service.

Returns:
OK if the services could be started, FAILED otherwise.

stop

Service.Result stop()
Tries to stop the service.

Returns:
OK if the services could be stopped, BUSY if the service can not be stopped yet because it is performing some task at the moment which can't be interrupted and FAILED otherwise.

suspend

Service.Result suspend()
Tries to suspend the execution of a service.

Returns:
OK if the services could be suspended, BUSY if the service can not be suspended yet because it is performing some task at the moment which can't be interrupted and FAILED otherwise.

resume

Service.Result resume()
Tries to resume the execution of a service or a start a service which has been stopped before.

Returns:
OK if the services could be resumed, FAILED otherwise.


Copyright © 2002-2008 RWTH Aachen, Department of Computer Science 3 (Software Engineering). All Rights Reserved.