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 void
doStartup()
boolean
isShuttingDown()
Returns true if server shutdown is in progress.boolean
isStarted()
Returns true if server was started (i.e.void
onApplicationEvent(org.springframework.context.event.ContextClosedEvent event)
void
registerShutdownAction(Runnable action)
It differs fromServerListener.serverShutdown()
- this action is performed after serverShutdown event was processed by all listeners.void
registerStartupAction(Runnable action)
It differs fromServerListener.serverStartup()
- this action is performed before serverStartup event is raised.void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
shutdown()
-
-
-
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:BuildServerState
Returns true if server was started (i.e.ServerListener.serverStartup()
event happened)- Specified by:
isStarted
in interfaceBuildServerState
-
isShuttingDown
public boolean isShuttingDown()
Description copied from interface:BuildServerState
Returns true if server shutdown is in progress.- Specified by:
isShuttingDown
in interfaceBuildServerState
- Returns:
- see above
-
doStartup
public void doStartup()
- Specified by:
doStartup
in interfaceBuildServerStartupAction
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(@NotNull org.springframework.context.event.ContextClosedEvent event)
- Specified by:
onApplicationEvent
in 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.
-
-