|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.services.BaseService
public class BaseService
Convenience base service implementation.
This implementation provides convienence methods for accessing service configuration settings as standard java properties.
Constructor Summary | |
---|---|
protected |
BaseService()
Protected constructor. |
Method Summary | |
---|---|
void |
create(java.lang.String name,
java.lang.String confHome,
ServiceEnvironment env,
XMLProperties xmlProps)
Default implementation that will set member configuration properties. |
void |
destroy()
Destroy this service by nulling the configuration properties. |
protected java.lang.String |
getConfigHome()
Return the path to the configuration directory. |
java.lang.String |
getName()
Return the name of this service. |
protected java.util.Properties |
getProperties()
Return all the service configuration properties. |
protected java.lang.String |
getProperty(java.lang.String name)
Return the value of the named service configuration property. |
protected XMLProperties |
getXMLProperties()
Return the configuration properties of this service as XML properties. |
protected void |
logConfig(java.lang.String msg)
Log a config message. |
protected void |
logFine(java.lang.String msg)
Log a fine message. |
protected void |
logFiner(java.lang.String msg)
Log a finer message. |
protected void |
logFinest(java.lang.String msg)
Log a finest message. |
protected void |
logInfo(java.lang.String msg)
Log an info message. |
protected void |
logSevere(java.lang.String msg,
java.lang.Throwable ex)
Log a severe message. |
protected void |
logWarning(java.lang.String msg,
java.lang.Throwable ex)
Log a warning message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BaseService()
Method Detail |
---|
public void create(java.lang.String name, java.lang.String confHome, ServiceEnvironment env, XMLProperties xmlProps) throws ServiceException
create
in interface Service
name
- The name of the service.confHome
- The path to the configuration home directory.env
- ServiceEnvironment of this service.xmlProps
- XML configuration properties.
ServiceException
- if the service cannot be created.protected java.lang.String getProperty(java.lang.String name)
name
- String containing the name of the property to return.
protected java.util.Properties getProperties()
protected XMLProperties getXMLProperties()
protected java.lang.String getConfigHome()
public java.lang.String getName()
protected void logFinest(java.lang.String msg)
msg
- String containing message to log.protected void logFiner(java.lang.String msg)
msg
- String containing message to log.protected void logFine(java.lang.String msg)
msg
- String containing message to log.protected void logConfig(java.lang.String msg)
msg
- String containing message to log.protected void logInfo(java.lang.String msg)
msg
- String containing message to log.protected void logWarning(java.lang.String msg, java.lang.Throwable ex)
msg
- String containing message to log.ex
- Optional throwable to include in the log.protected void logSevere(java.lang.String msg, java.lang.Throwable ex)
msg
- String containing message to log.ex
- Optional throwable to include in the log.public void destroy()
destroy
in interface Service
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |