|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.management.javaee.ManagedObject
org.ow2.jonas.lib.service.AbsServiceImpl
public abstract class AbsServiceImpl
Abstract implementation of a Service.
| 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. |
long |
getSequenceNumber()
Return a sequence number and increase this number. |
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.management.javaee.ManagedObject |
|---|
getModelMBean, sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean |
| 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 Servicectx - configuration of the service
ServiceException - service initialization failedpublic ServerProperties getServerProperties()
public void setServerProperties(ServerProperties props)
props - ServerProperties instance
public void start()
throws ServiceException
start in interface ServiceServiceException - service start-up failed
public void stop()
throws ServiceException
stop in interface ServiceServiceException - service stopping failedpublic boolean isStarted()
isStarted in interface Servicepublic String getName()
getName in interface Servicepublic void setName(String name)
setName in interface Servicename - 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 failed
protected abstract void doStart()
throws ServiceException
ServiceException - service start-up failed
protected abstract void doStop()
throws ServiceException
ServiceException - service stopping failedpublic String toString()
toString in class ObjectObject.toString()
protected void throwRequirementException(String message)
throws ServiceException
message - Descriptive requirement message.
ServiceException - always.protected static List<String> convertToList(String value)
value - String value
public long getSequenceNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||