|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.NotificationBroadcasterSupport org.ow2.jonas.lib.reconfig.ReconfigEmitter org.ow2.jonas.lib.service.AbsServiceImpl
public abstract class AbsServiceImpl
Abstract implementation of a Service
.
Field Summary |
---|
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
---|---|
AbsServiceImpl()
|
Method Summary | |
---|---|
protected static List<String> |
convertToList(String value)
Utility method to convert a given String of comma-separated elements to a List. |
protected void |
doInit(Context ctx)
Deprecated. |
protected abstract void |
doStart()
Abstract start-up method to be implemented by sub-classes. |
protected abstract void |
doStop()
Abstract method for service stopping to be implemented by sub-classes. |
String |
getDomainName()
Return the domain's name of this service. |
String |
getJonasServerName()
Return the JOnAS server's name of this service. |
String |
getName()
Returns the service's name. |
ServerProperties |
getServerProperties()
Get the Server Properties. |
void |
init(Context ctx)
Initialize the service. |
boolean |
isStarted()
Returns true if the service is started, false otherwise. |
void |
setName(String name)
Set the service's name. |
void |
setServerProperties(ServerProperties props)
Set the Server Properties. |
void |
start()
Start the service. |
void |
stop()
Stop the service. |
protected void |
throwRequirementException(String message)
Utility Exception throwing method to identify the error source. |
String |
toString()
|
Methods inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
---|
initLogger, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbsServiceImpl()
Method Detail |
---|
public void init(Context ctx) throws ServiceException
init
in interface Service
ctx
- configuration of the service
ServiceException
- service initialization failedpublic ServerProperties getServerProperties()
public void setServerProperties(ServerProperties props)
props
- ServerProperties
instancepublic void start() throws ServiceException
start
in interface Service
ServiceException
- service start-up failedpublic void stop() throws ServiceException
stop
in interface Service
ServiceException
- service stopping failedpublic boolean isStarted()
isStarted
in interface Service
public String getName()
getName
in interface Service
public void setName(String name)
setName
in interface Service
name
- the name to setpublic String getDomainName()
public String getJonasServerName()
@Deprecated protected void doInit(Context ctx) throws ServiceException
ctx
- configuration of the service
ServiceException
- service initialization failedprotected abstract void doStart() throws ServiceException
ServiceException
- service start-up failedprotected abstract void doStop() throws ServiceException
ServiceException
- service stopping failedpublic String toString()
toString
in class Object
Object.toString()
protected void throwRequirementException(String message) throws ServiceException
message
- Descriptive requirement message.
ServiceException
- always.protected static List<String> convertToList(String value)
value
- String value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |