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.Stateand 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.ServiceNameINTERNAL_SERVICE_NAMEOnly for use within the WildFly Core kernel; may change or be removed at any timestatic org.jboss.msc.service.ServiceNameSERVICE_NAMEDeprecated.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 voidaddPropertyChangeListener(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.StategetCurrentState()Returns the current process state.ControlledProcessStateServicegetValue()voidremovePropertyChangeListener(PropertyChangeListener listener)Removes a previouslyregistered listener.voidstart(org.jboss.msc.service.StartContext context)voidstop(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:
startin interfaceorg.jboss.msc.Service- Specified by:
startin interfaceorg.jboss.msc.service.Service<ControlledProcessStateService>- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service- Specified by:
stopin interfaceorg.jboss.msc.service.Service<ControlledProcessStateService>
-
getValue
public ControlledProcessStateService getValue()
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<ControlledProcessStateService>
-
getCurrentState
public ControlledProcessState.State getCurrentState()
Returns the current process state.- Specified by:
getCurrentStatein interfaceProcessStateNotifier- Returns:
- the current state
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Registers a listener for changes to the process state.- Specified by:
addPropertyChangeListenerin interfaceProcessStateNotifier- Parameters:
listener- the listener
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a previouslyregistered listener.- Specified by:
removePropertyChangeListenerin interfaceProcessStateNotifier- Parameters:
listener- the listener
-
-