Class SuspendableService

java.lang.Object
org.jboss.as.clustering.service.SuspendableService
All Implemented Interfaces:
org.jboss.as.server.suspend.SuspendableActivity, org.wildfly.clustering.server.service.Service

public class SuspendableService extends Object implements org.wildfly.clustering.server.service.Service, org.jboss.as.server.suspend.SuspendableActivity
A Service decorator that auto-stops on server suspend and auto-starts on server resume.
Author:
Paul Ferraro
  • Field Summary

    Fields inherited from interface org.jboss.as.server.suspend.SuspendableActivity

    COMPLETED
  • Constructor Summary

    Constructors
    Constructor
    Description
    SuspendableService(org.wildfly.clustering.server.service.Service service, org.jboss.as.server.suspend.SuspendableActivityRegistry registry, Executor executor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    resume(org.jboss.as.server.suspend.ServerResumeContext context)
     
    void
     
    void
     
    suspend(org.jboss.as.server.suspend.ServerSuspendContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.jboss.as.server.suspend.SuspendableActivity

    prepare
  • Constructor Details

    • SuspendableService

      public SuspendableService(org.wildfly.clustering.server.service.Service service, org.jboss.as.server.suspend.SuspendableActivityRegistry registry, Executor executor)
  • Method Details

    • isStarted

      public boolean isStarted()
      Specified by:
      isStarted in interface org.wildfly.clustering.server.service.Service
    • start

      public void start()
      Specified by:
      start in interface org.wildfly.clustering.server.service.Service
    • stop

      public void stop()
      Specified by:
      stop in interface org.wildfly.clustering.server.service.Service
    • suspend

      public CompletionStage<Void> suspend(org.jboss.as.server.suspend.ServerSuspendContext context)
      Specified by:
      suspend in interface org.jboss.as.server.suspend.SuspendableActivity
    • resume

      public CompletionStage<Void> resume(org.jboss.as.server.suspend.ServerResumeContext context)
      Specified by:
      resume in interface org.jboss.as.server.suspend.SuspendableActivity