Package org.jboss.as.controller
Class ControlledProcessStateService
- java.lang.Object
-
- org.jboss.as.controller.ControlledProcessStateService
-
- All Implemented Interfaces:
ProcessStateNotifier
,org.jboss.msc.Service
,org.jboss.msc.service.Service<ControlledProcessStateService>
,org.jboss.msc.value.Value<ControlledProcessStateService>
public class ControlledProcessStateService extends Object implements org.jboss.msc.service.Service<ControlledProcessStateService>, ProcessStateNotifier
Exposes the currentControlledProcessState.State
and allows services to register a listener for changes to it.- Author:
- Brian Stansberry (c) 2011 Red Hat Inc., Richard Opalka
-
-
Field Summary
Fields Modifier and Type Field Description static org.jboss.msc.service.ServiceName
INTERNAL_SERVICE_NAME
Only for use within the WildFly Core kernel; may change or be removed at any timestatic org.jboss.msc.service.ServiceName
SERVICE_NAME
Deprecated.use the 'org.wildfly.management.process-state-notifier' capability to obtain aProcessStateNotifier
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(PropertyChangeListener listener)
Registers a listener for changes to the process state.static org.jboss.msc.service.ServiceController<ControlledProcessStateService>
addService(org.jboss.msc.service.ServiceTarget target, ControlledProcessState processState)
ControlledProcessState.State
getCurrentState()
Returns the current process state.ControlledProcessStateService
getValue()
void
removePropertyChangeListener(PropertyChangeListener listener)
Removes a previouslyregistered listener
.void
start(org.jboss.msc.service.StartContext context)
void
stop(org.jboss.msc.service.StopContext context)
-
-
-
Field Detail
-
SERVICE_NAME
@Deprecated public static final org.jboss.msc.service.ServiceName SERVICE_NAME
Deprecated.use the 'org.wildfly.management.process-state-notifier' capability to obtain aProcessStateNotifier
-
INTERNAL_SERVICE_NAME
public static final org.jboss.msc.service.ServiceName INTERNAL_SERVICE_NAME
Only for use within the WildFly Core kernel; may change or be removed at any time
-
-
Method Detail
-
addService
public static org.jboss.msc.service.ServiceController<ControlledProcessStateService> addService(org.jboss.msc.service.ServiceTarget target, ControlledProcessState processState)
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
- Specified by:
start
in interfaceorg.jboss.msc.Service
- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stop
in interfaceorg.jboss.msc.Service
-
getValue
public ControlledProcessStateService getValue()
- Specified by:
getValue
in interfaceorg.jboss.msc.value.Value<ControlledProcessStateService>
-
getCurrentState
public ControlledProcessState.State getCurrentState()
Returns the current process state.- Specified by:
getCurrentState
in interfaceProcessStateNotifier
- Returns:
- the current state
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Registers a listener for changes to the process state.- Specified by:
addPropertyChangeListener
in interfaceProcessStateNotifier
- Parameters:
listener
- the listener
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a previouslyregistered listener
.- Specified by:
removePropertyChangeListener
in interfaceProcessStateNotifier
- Parameters:
listener
- the listener
-
-