com.atlassian.bamboo.chains
Class ChainExecutionManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.chains.ChainExecutionManagerImpl
All Implemented Interfaces:
ChainExecutionManager, HibernateEventListener, com.atlassian.event.EventListener

public class ChainExecutionManagerImpl
extends java.lang.Object
implements ChainExecutionManager, HibernateEventListener


Constructor Summary
ChainExecutionManagerImpl(ChainStatePersister chainStatePersister, BuildContextExecutor buildContextExecutor, ChainStateFactory chainStateFactory, com.atlassian.event.EventManager eventManager, com.atlassian.bamboo.chains.ChainPluginSupport chainPluginSupport)
           
 
Method Summary
 ChainExecution getChainExecution(java.lang.String chainStateKey)
          Get the state of the single ChainExecution
 java.util.Collection<ChainExecution> getExecutingChains(Chain chain)
          Get the Collection of the state of the ChainExecution or empty collection when no chain is executing
 java.lang.Class<? extends com.atlassian.event.Event>[] getHandledEventClasses()
           
 void handleEvent(com.atlassian.event.Event event)
           
 boolean isRunning(Chain chain)
          Checks if the Chain is running
 ChainExecution start(Chain chain, BuildDetectionAction buildDetectionAction)
          Starts the Chain
 void stop(Chain chain)
          Stops the Chain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainExecutionManagerImpl

public ChainExecutionManagerImpl(ChainStatePersister chainStatePersister,
                                 BuildContextExecutor buildContextExecutor,
                                 ChainStateFactory chainStateFactory,
                                 com.atlassian.event.EventManager eventManager,
                                 com.atlassian.bamboo.chains.ChainPluginSupport chainPluginSupport)
Method Detail

getExecutingChains

@NotNull
public java.util.Collection<ChainExecution> getExecutingChains(@NotNull
                                                                       Chain chain)
Description copied from interface: ChainExecutionManager
Get the Collection of the state of the ChainExecution or empty collection when no chain is executing

Specified by:
getExecutingChains in interface ChainExecutionManager
Returns:
chainExecution

getChainExecution

@Nullable
public ChainExecution getChainExecution(@NotNull
                                                 java.lang.String chainStateKey)
Description copied from interface: ChainExecutionManager
Get the state of the single ChainExecution

Specified by:
getChainExecution in interface ChainExecutionManager
Returns:

start

@Nullable
public ChainExecution start(@NotNull
                                     Chain chain,
                                     @NotNull
                                     BuildDetectionAction buildDetectionAction)
Description copied from interface: ChainExecutionManager
Starts the Chain

Specified by:
start in interface ChainExecutionManager
Returns:
success or null if chain execution has not been started

stop

public void stop(@NotNull
                 Chain chain)
Description copied from interface: ChainExecutionManager
Stops the Chain

Specified by:
stop in interface ChainExecutionManager

isRunning

public boolean isRunning(@NotNull
                         Chain chain)
Description copied from interface: ChainExecutionManager
Checks if the Chain is running

Specified by:
isRunning in interface ChainExecutionManager
Returns:
running

handleEvent

public void handleEvent(com.atlassian.event.Event event)
Specified by:
handleEvent in interface HibernateEventListener
Specified by:
handleEvent in interface com.atlassian.event.EventListener

getHandledEventClasses

public java.lang.Class<? extends com.atlassian.event.Event>[] getHandledEventClasses()
Specified by:
getHandledEventClasses in interface HibernateEventListener
Specified by:
getHandledEventClasses in interface com.atlassian.event.EventListener


Copyright © 2010 Atlassian. All Rights Reserved.