Class 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 a ServerActivity instance can be registered directly with this controller.

    Author:
    Stuart Douglas
    • 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
    • Constructor Detail

      • SuspendController

        public SuspendController()
    • 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:
        start in interface org.jboss.msc.Service
        Specified by:
        start in interface org.jboss.msc.service.Service<SuspendController>
        Throws:
        org.jboss.msc.service.StartException
      • stop

        public void stop​(org.jboss.msc.service.StopContext stopContext)
        Specified by:
        stop in interface org.jboss.msc.Service
        Specified by:
        stop in interface org.jboss.msc.service.Service<SuspendController>
      • getNotificationHandlerRegistry

        public org.jboss.msc.value.InjectedValue<NotificationHandlerRegistry> getNotificationHandlerRegistry()