de.janrufmonitor.service
Interface IService

All Known Implementing Classes:
AbstractConfigurableService, AbstractReceiverConfigurableService

public interface IService

This interface must be implemented by a service object, which should be used in the framework.

Author:
Thilo Brandt

Method Summary
 List getDependencyServices()
          Gets a list of IDs (java.lang.String) of services which have to be started before this service is started.
 int getPriority()
          Gets the priority of the service within the framework. 0 = hight priority, 999 = low priority.
 String getServiceID()
          Gets the ID of the service.
 boolean isEnabled()
          Checks if the service is enabled.
 boolean isRunning()
          Checks if the service is running.
 void restart()
          Restarts the service.
 void setEnabled(boolean status)
          Sets the status of a service.
 void shutdown()
          Shuts down the service.
 void startup()
          Starts up the service.
 

Method Detail

getServiceID

String getServiceID()
Gets the ID of the service.

Returns:
a valid service ID

isEnabled

boolean isEnabled()
Checks if the service is enabled.

Returns:
true if enabled, false if not

setEnabled

void setEnabled(boolean status)
Sets the status of a service.

Parameters:
status - true if enabled, false if not.

startup

void startup()
Starts up the service. Can be used for initialization.


shutdown

void shutdown()
Shuts down the service. Can be used for cleanup.


restart

void restart()
Restarts the service.


getPriority

int getPriority()
Gets the priority of the service within the framework. 0 = hight priority, 999 = low priority.

Returns:
priority of the service.

isRunning

boolean isRunning()
Checks if the service is running.

Returns:
true if running, false if not

getDependencyServices

List getDependencyServices()
Gets a list of IDs (java.lang.String) of services which have to be started before this service is started.

Returns:
a list of service IDs


Copyright © 2010 by Thilo Brandt. All Rights Reserved.