Class RestartEndpoint

java.lang.Object
org.springframework.cloud.context.restart.RestartEndpoint
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<ContextRefreshedWithApplicationEvent>

@Endpoint(id="restart", defaultAccess=NONE) public class RestartEndpoint extends Object implements org.springframework.context.ApplicationListener<ContextRefreshedWithApplicationEvent>
An endpoint that restarts the application context. Install as a bean and also register a RestartListener with the SpringApplication that starts the context. Those two components communicate via an ApplicationEvent and set up the state needed to doRestart the context.
Author:
Dave Syer
  • Constructor Details

    • RestartEndpoint

      public RestartEndpoint()
  • Method Details

    • getTimeout

      public long getTimeout()
    • setTimeout

      public void setTimeout(long timeout)
    • setIntegrationMBeanExporter

      public void setIntegrationMBeanExporter(Object exporter)
    • onApplicationEvent

      public void onApplicationEvent(ContextRefreshedWithApplicationEvent input)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<ContextRefreshedWithApplicationEvent>
    • restart

      @WriteOperation public Object restart()
    • getPauseEndpoint

      public RestartEndpoint.PauseEndpoint getPauseEndpoint()
    • getResumeEndpoint

      public RestartEndpoint.ResumeEndpoint getResumeEndpoint()
    • doRestart

      public org.springframework.context.ConfigurableApplicationContext doRestart()
    • isRunning

      public boolean isRunning()
    • doPause

      public void doPause()
    • doResume

      public void doResume()