Package org.jboss.as.server.suspend
Class SuspendController
- java.lang.Object
-
- org.jboss.as.server.suspend.SuspendController
-
- All Implemented Interfaces:
org.jboss.msc.Service,org.jboss.msc.service.Service<SuspendController>,org.jboss.msc.value.Value<SuspendController>
public class SuspendController extends Object implements org.jboss.msc.service.Service<SuspendController>
The graceful shutdown controller. This class co-ordinates the graceful shutdown and pause/resume of a servers operations. In most cases this work is delegated to the request controller subsystem. however for workflows that do no correspond directly to a request model aServerActivityinstance can be registered directly with this controller.- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSuspendController.State
-
Field Summary
Fields Modifier and Type Field Description static org.jboss.msc.service.ServiceNameSERVICE_NAMEDeprecated.Use org.jboss.as.server.Services.JBOSS_SUSPEND_CONTROLLER instead which gets the service name via org.wildfly.server.suspend-controller capability
-
Constructor Summary
Constructors Constructor Description SuspendController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(OperationListener listener)org.jboss.msc.value.InjectedValue<NotificationHandlerRegistry>getNotificationHandlerRegistry()SuspendController.StategetState()SuspendControllergetValue()voidnonGracefulStart()voidregisterActivity(ServerActivity activity)voidremoveListener(OperationListener listener)voidresume()voidsetStartSuspended(boolean startSuspended)voidstart(org.jboss.msc.service.StartContext startContext)voidstop(org.jboss.msc.service.StopContext stopContext)voidsuspend(long timeoutMillis)voidunRegisterActivity(ServerActivity activity)
-
-
-
Field Detail
-
SERVICE_NAME
@Deprecated public static final org.jboss.msc.service.ServiceName SERVICE_NAME
Deprecated.Use org.jboss.as.server.Services.JBOSS_SUSPEND_CONTROLLER instead which gets the service name via org.wildfly.server.suspend-controller capability
-
-
Method Detail
-
setStartSuspended
public void setStartSuspended(boolean startSuspended)
-
suspend
public void suspend(long timeoutMillis)
-
nonGracefulStart
public void nonGracefulStart()
-
resume
public void resume()
-
registerActivity
public void registerActivity(ServerActivity activity)
-
unRegisterActivity
public void unRegisterActivity(ServerActivity activity)
-
start
public void start(org.jboss.msc.service.StartContext startContext) throws org.jboss.msc.service.StartException- Specified by:
startin interfaceorg.jboss.msc.Service- Specified by:
startin interfaceorg.jboss.msc.service.Service<SuspendController>- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext stopContext)
- Specified by:
stopin interfaceorg.jboss.msc.Service- Specified by:
stopin interfaceorg.jboss.msc.service.Service<SuspendController>
-
getState
public SuspendController.State getState()
-
addListener
public void addListener(OperationListener listener)
-
removeListener
public void removeListener(OperationListener listener)
-
getValue
public SuspendController getValue() throws IllegalStateException, IllegalArgumentException
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<SuspendController>- Throws:
IllegalStateExceptionIllegalArgumentException
-
getNotificationHandlerRegistry
public org.jboss.msc.value.InjectedValue<NotificationHandlerRegistry> getNotificationHandlerRegistry()
-
-