|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.repository.service.AbstractServiceAdministrator
@ThreadSafe public abstract class AbstractServiceAdministrator
Simple abstract implementation of the service administrator interface that can be easily subclassed by services that require an administrative interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jboss.dna.repository.service.ServiceAdministrator |
---|
ServiceAdministrator.State |
Method Summary | |
---|---|
String |
getServiceName()
Get the name of this service in the current locale. |
String |
getServiceName(Locale locale)
Get the name of this service in the specified locale. |
ServiceAdministrator.State |
getState()
Return the current state of this service. |
boolean |
isPaused()
Return whether this service is currently paused. |
boolean |
isShutdown()
Return whether this service is stopped and unable to be restarted. |
boolean |
isStarted()
Return whether this service has been started and is currently running. |
boolean |
isTerminated()
Return whether this system has finished shutting down . |
ServiceAdministrator |
pause()
Temporarily stop monitoring and sequencing events. |
ServiceAdministrator |
setState(ServiceAdministrator.State state)
Set the state of the service. |
ServiceAdministrator |
setState(String state)
Set the state of the service. |
ServiceAdministrator |
shutdown()
Permanently stop monitoring and sequencing events. |
ServiceAdministrator |
start()
Start monitoring and sequence the events. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.dna.repository.service.ServiceAdministrator |
---|
awaitTermination |
Method Detail |
---|
public ServiceAdministrator.State getState()
getState
in interface ServiceAdministrator
public ServiceAdministrator setState(ServiceAdministrator.State state)
setState
in interface ServiceAdministrator
state
- the desired state
setState(String)
,
start()
,
pause()
,
shutdown()
public ServiceAdministrator setState(String state)
setState
in interface ServiceAdministrator
state
- the desired state in string form
IllegalArgumentException
- if the specified state string is null or does not match one of the predefined
predefined enumerated values
ServiceAdministrator.setState(State)
,
start()
,
pause()
,
shutdown()
public ServiceAdministrator start()
paused
. However, once the service is shutdown
, it cannot be started or paused.
start
in interface ServiceAdministrator
IllegalStateException
- if called when the service has been shutdown
.pause()
,
shutdown()
,
isStarted()
public ServiceAdministrator pause()
started
. However, once the service is shutdown
, it cannot be started or paused.
pause
in interface ServiceAdministrator
IllegalStateException
- if called when the service has been shutdown
.start()
,
shutdown()
,
isPaused()
public ServiceAdministrator shutdown()
restarted
or paused
.
shutdown
in interface ServiceAdministrator
start()
,
pause()
,
isShutdown()
public boolean isStarted()
isStarted
in interface ServiceAdministrator
start()
,
pause()
,
isPaused()
,
isShutdown()
public boolean isPaused()
isPaused
in interface ServiceAdministrator
pause()
,
start()
,
isStarted()
,
isShutdown()
public boolean isShutdown()
isShutdown
in interface ServiceAdministrator
shutdown()
,
isPaused()
,
isStarted()
public boolean isTerminated()
shutting down
. Note that isTerminated
is never
true
unless either ServiceAdministrator.shutdown()
was called first.
isTerminated
in interface ServiceAdministrator
ServiceAdministrator.shutdown()
,
ServiceAdministrator.isPaused()
,
ServiceAdministrator.isStarted()
,
ServiceAdministrator.isShutdown()
public String getServiceName()
public String getServiceName(Locale locale)
locale
- the locale in which the service name is to be returned; may be null if the default locale is to be used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |