Class BuildServerLifecycleProcessor
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.BuildServerLifecycleProcessor
-
- All Implemented Interfaces:
EventListener,BuildServerStartupAction,BuildServerState,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
public class BuildServerLifecycleProcessor extends Object implements BuildServerState, BuildServerStartupAction, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>, org.springframework.context.ApplicationContextAware
Created 09.05.13 14:25- Author:
- Eugene Petrenko (eugene.petrenko@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description BuildServerLifecycleProcessor(EventDispatcher<BuildServerListener> eventDispatcher, ExecutorServiceManager executorServiceManager, Heartbeat heartbeat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoStartup()booleanisShuttingDown()Returns true if server shutdown is in progress.booleanisStarted()Returns true if server was started (i.e.voidonApplicationEvent(org.springframework.context.event.ContextClosedEvent event)voidregisterShutdownAction(Runnable action)It differs fromServerListener.serverShutdown()- this action is performed after serverShutdown event was processed by all listeners.voidregisterStartupAction(Runnable action)It differs fromServerListener.serverStartup()- this action is performed before serverStartup event is raised.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidshutdown()
-
-
-
Constructor Detail
-
BuildServerLifecycleProcessor
public BuildServerLifecycleProcessor(@NotNull EventDispatcher<BuildServerListener> eventDispatcher, @NotNull ExecutorServiceManager executorServiceManager, @NotNull Heartbeat heartbeat)
-
-
Method Detail
-
isStarted
public boolean isStarted()
Description copied from interface:BuildServerStateReturns true if server was started (i.e.ServerListener.serverStartup()event happened)- Specified by:
isStartedin interfaceBuildServerState
-
isShuttingDown
public boolean isShuttingDown()
Description copied from interface:BuildServerStateReturns true if server shutdown is in progress.- Specified by:
isShuttingDownin interfaceBuildServerState- Returns:
- see above
-
doStartup
public void doStartup()
- Specified by:
doStartupin interfaceBuildServerStartupAction
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(@NotNull org.springframework.context.event.ContextClosedEvent event)- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
-
shutdown
public void shutdown()
-
registerShutdownAction
public void registerShutdownAction(@NotNull Runnable action)It differs fromServerListener.serverShutdown()- this action is performed after serverShutdown event was processed by all listeners.
-
registerStartupAction
public void registerStartupAction(@NotNull Runnable action)It differs fromServerListener.serverStartup()- this action is performed before serverStartup event is raised.
-
-