|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.janrufmonitor.service.AbstractConfigurableService
public abstract class AbstractConfigurableService
This abstract class can be used as base class for a new service implementation which is supporting configuration.
| Field Summary | |
|---|---|
protected String |
CFG_ENABLED
|
protected String |
CFG_PRIORITY
|
protected Properties |
m_configuration
|
protected Logger |
m_logger
|
| Constructor Summary | |
|---|---|
AbstractConfigurableService()
Default constructor. |
|
| Method Summary | |
|---|---|
String |
getConfigurableID()
Gets the ID of the configurable object. |
List |
getDependencyServices()
Gets a list of IDs (java.lang.String) of services which have to be started before this service is started. |
abstract String |
getID()
Gets the ID of the new service. |
abstract String |
getNamespace()
Gets the namespace of the configurable object. |
int |
getPriority()
Gets the priority of the service within the framework. 0 = hight priority, 999 = low priority. |
abstract IRuntime |
getRuntime()
Gets the runtime objects. |
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 |
setConfiguration(Properties configuration)
Sets the configuration in the configurable object. |
void |
setEnabled(boolean enabled)
Sets the status of a service. |
void |
shutdown()
Shuts down the service. |
void |
startup()
Starts up the service. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String CFG_ENABLED
protected String CFG_PRIORITY
protected Logger m_logger
protected Properties m_configuration
| Constructor Detail |
|---|
public AbstractConfigurableService()
| Method Detail |
|---|
public String getServiceID()
IService
getServiceID in interface IServicepublic String getConfigurableID()
IConfigurable
getConfigurableID in interface IConfigurablepublic boolean isEnabled()
IService
isEnabled in interface IServicepublic void setEnabled(boolean enabled)
IService
setEnabled in interface IServiceenabled - true if enabled, false if not.public int getPriority()
IService
getPriority in interface IServicepublic void setConfiguration(Properties configuration)
IConfigurable
setConfiguration in interface IConfigurableconfiguration - the configuration for the given namespacepublic void restart()
IService
restart in interface IServicepublic void startup()
IService
startup in interface IServicepublic void shutdown()
IService
shutdown in interface IServicepublic boolean isRunning()
IService
isRunning in interface IServicepublic List getDependencyServices()
IService
getDependencyServices in interface IServicepublic abstract String getNamespace()
IConfigurable
getNamespace in interface IConfigurablepublic abstract String getID()
public abstract IRuntime getRuntime()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||