Package org.jboss.as.controller
Interface ProcessStateNotifier
-
- All Known Implementing Classes:
ControlledProcessStateService
public interface ProcessStateNotifierAllows callers to check the currentControlledProcessState.Stateof the process and to register for notifications of state changes.- Author:
- Brian Stansberry (c) 2019 Red Hat Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static NullaryServiceDescriptor<ProcessStateNotifier>SERVICE_DESCRIPTOR
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener listener)Register a listener for changes in the current state.ControlledProcessState.StategetCurrentState()Gets the current state of the controlled process.voidremovePropertyChangeListener(PropertyChangeListener listener)Remove a listener for changes in the current state.
-
-
-
Field Detail
-
SERVICE_DESCRIPTOR
static final NullaryServiceDescriptor<ProcessStateNotifier> SERVICE_DESCRIPTOR
-
-
Method Detail
-
getCurrentState
ControlledProcessState.State getCurrentState()
Gets the current state of the controlled process.- Returns:
- the current state. Will not be
null
-
addPropertyChangeListener
void addPropertyChangeListener(PropertyChangeListener listener)
Register a listener for changes in the current state. The listener will be notified with aPropertyChangeEventwhose property name will becurrentState. Iflisteneris null, no exception is thrown and no action is taken.- Parameters:
listener- the listener
-
removePropertyChangeListener
void removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for changes in the current state. Iflistenerwas added more than once, it will be notified one less time after being removed. Iflisteneris null, or was never added, no exception is thrown and no action is taken.- Parameters:
listener- the listener
-
-