Package org.jboss.as.controller
Class ControlledProcessStateService
java.lang.Object
org.jboss.as.controller.ControlledProcessStateService
- All Implemented Interfaces:
ProcessStateNotifier,ProcessStateNotifier
public class ControlledProcessStateService
extends Object
implements ProcessStateNotifier, ProcessStateNotifier
Exposes the current
ControlledProcessState.State and allows services to register a listener for changes
to it.- Author:
- Brian Stansberry (c) 2011 Red Hat Inc., Richard Opalka
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.jboss.msc.service.ServiceNameOnly for use within the WildFly Core kernel; may change or be removed at any timestatic final org.jboss.msc.service.ServiceNameDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from interface org.jboss.as.controller.ProcessStateNotifier
SERVICE_DESCRIPTOR -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidRegisters a listener for changes to the process state.static ProcessStateNotifieraddService(org.jboss.msc.service.ServiceTarget target, ControlledProcessState processState) Obtains aProcessStateNotifierlinked to the givenprocessStateobject and installs an MSCServicethat provides it as its value.Returns the current process state.Returns the current process state.voidvoidRemoves a previouslyregistered listener.
-
Field Details
-
SERVICE_NAME
Deprecated, for removal: This API element is subject to removal in a future version.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_NAMEOnly for use within the WildFly Core kernel; may change or be removed at any time
-
-
Method Details
-
addService
public static ProcessStateNotifier addService(org.jboss.msc.service.ServiceTarget target, ControlledProcessState processState) Obtains aProcessStateNotifierlinked to the givenprocessStateobject and installs an MSCServicethat provides it as its value.- Parameters:
target- service target to use to install the service. Cannot benull.processState-ControlledProcessStateinstance whose changes will be tracked by the returned notifier.- Returns:
- the
ProcessStateNotifierthat is the value of the installed service.
-
getCurrentState
Returns the current process state.- Specified by:
getCurrentStatein interfaceProcessStateNotifier- Returns:
- the current state
-
getEmbeddedProcessState
Returns the current process state.- Specified by:
getEmbeddedProcessStatein interfaceProcessStateNotifier- Returns:
- the current state
-
addPropertyChangeListener
Registers a listener for changes to the process state.- Specified by:
addPropertyChangeListenerin interfaceProcessStateNotifier- Parameters:
listener- the listener
-
removePropertyChangeListener
Removes a previouslyregistered listener.- Specified by:
removePropertyChangeListenerin interfaceProcessStateNotifier- Parameters:
listener- the listener
-
addProcessStateListener
- Specified by:
addProcessStateListenerin interfaceProcessStateNotifier
-
removeProcessStateListener
- Specified by:
removeProcessStateListenerin interfaceProcessStateNotifier
-
ProcessStateNotifier