com.dtolabs.rundeck.core.execution.workflow
Class WorkflowExecutionListenerImpl

java.lang.Object
  extended by com.dtolabs.rundeck.core.execution.ExecutionListenerOverrideBase
      extended by com.dtolabs.rundeck.core.execution.workflow.WorkflowExecutionListenerImpl
All Implemented Interfaces:
ContextLoggerExecutionListener, Contextual, ExecutionListener, ExecutionListenerOverride, WorkflowExecutionListener, PluginLogger

public class WorkflowExecutionListenerImpl
extends ExecutionListenerOverrideBase
implements WorkflowExecutionListener

WorkflowExecutionListenerImpl uses the WorkflowExecutionListener methods to maintain workflow execution context data while executing workflows, allowing the ContextLogger to have proper context.


Constructor Summary
  WorkflowExecutionListenerImpl(FailedNodesListener failedNodesListener, ContextLogger logger, boolean terse, java.lang.String logFormat)
           
protected WorkflowExecutionListenerImpl(WorkflowExecutionListenerImpl delegate)
           
 
Method Summary
 void beginExecuteNodeStep(ExecutionContext context, NodeStepExecutionItem item, INodeEntry node)
          Begin execution of a node step
 void beginWorkflowExecution(StepExecutionContext executionContext, WorkflowExecutionItem item)
           
 void beginWorkflowItem(int step, StepExecutionItem item)
           
 ExecutionListenerOverride createOverride()
          Return an ExecutionListenerOverride that will delegate to this ExecutionListener, but allows overriding property values.
 void finishExecuteNodeStep(NodeStepResult result, ExecutionContext context, StepExecutionItem item, INodeEntry node)
          Finish execution of a node step
 void finishWorkflowExecution(WorkflowExecutionResult result, StepExecutionContext executionContext, WorkflowExecutionItem item)
           
 void finishWorkflowItem(int step, StepExecutionItem item)
           
 java.util.Map<java.lang.String,java.lang.String> getContext()
          Return the current context, or null.
 java.util.Map<java.lang.String,java.lang.String> getLoggingContext()
          Method should be overridden to return appropriate logging context data
 void log(int level, java.lang.String message)
          Log a message
 void log(int level, java.lang.String message, java.util.Map<java.lang.String,java.lang.String> data)
           
 
Methods inherited from class com.dtolabs.rundeck.core.execution.ExecutionListenerOverrideBase
beginFileCopyFile, beginFileCopyFileStream, beginFileCopyScriptContent, beginNodeDispatch, beginNodeDispatch, beginNodeExecution, beginStepExecution, finishFileCopy, finishNodeDispatch, finishNodeDispatch, finishNodeExecution, finishStepExecution, getFailedNodesListener, getLogFormat, isTerse, setFailedNodesListener, setLogFormat, setTerse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.dtolabs.rundeck.core.execution.ExecutionListener
beginFileCopyFile, beginFileCopyFileStream, beginFileCopyScriptContent, beginNodeDispatch, beginNodeDispatch, beginNodeExecution, beginStepExecution, finishFileCopy, finishNodeDispatch, finishNodeDispatch, finishNodeExecution, finishStepExecution, getFailedNodesListener, getLogFormat, isTerse, log
 

Constructor Detail

WorkflowExecutionListenerImpl

protected WorkflowExecutionListenerImpl(WorkflowExecutionListenerImpl delegate)

WorkflowExecutionListenerImpl

public WorkflowExecutionListenerImpl(FailedNodesListener failedNodesListener,
                                     ContextLogger logger,
                                     boolean terse,
                                     java.lang.String logFormat)
Method Detail

beginExecuteNodeStep

public void beginExecuteNodeStep(ExecutionContext context,
                                 NodeStepExecutionItem item,
                                 INodeEntry node)
Description copied from interface: ExecutionListener
Begin execution of a node step

Specified by:
beginExecuteNodeStep in interface ExecutionListener
Overrides:
beginExecuteNodeStep in class ExecutionListenerOverrideBase

finishExecuteNodeStep

public void finishExecuteNodeStep(NodeStepResult result,
                                  ExecutionContext context,
                                  StepExecutionItem item,
                                  INodeEntry node)
Description copied from interface: ExecutionListener
Finish execution of a node step

Specified by:
finishExecuteNodeStep in interface ExecutionListener
Overrides:
finishExecuteNodeStep in class ExecutionListenerOverrideBase

getLoggingContext

public java.util.Map<java.lang.String,java.lang.String> getLoggingContext()
Description copied from class: ExecutionListenerOverrideBase
Method should be overridden to return appropriate logging context data

Specified by:
getLoggingContext in interface ContextLoggerExecutionListener
Overrides:
getLoggingContext in class ExecutionListenerOverrideBase

beginWorkflowExecution

public void beginWorkflowExecution(StepExecutionContext executionContext,
                                   WorkflowExecutionItem item)
Specified by:
beginWorkflowExecution in interface WorkflowExecutionListener

finishWorkflowExecution

public void finishWorkflowExecution(WorkflowExecutionResult result,
                                    StepExecutionContext executionContext,
                                    WorkflowExecutionItem item)
Specified by:
finishWorkflowExecution in interface WorkflowExecutionListener

beginWorkflowItem

public void beginWorkflowItem(int step,
                              StepExecutionItem item)
Specified by:
beginWorkflowItem in interface WorkflowExecutionListener

finishWorkflowItem

public void finishWorkflowItem(int step,
                               StepExecutionItem item)
Specified by:
finishWorkflowItem in interface WorkflowExecutionListener

createOverride

public ExecutionListenerOverride createOverride()
Description copied from interface: ExecutionListener
Return an ExecutionListenerOverride that will delegate to this ExecutionListener, but allows overriding property values.

Specified by:
createOverride in interface ExecutionListener

log

public final void log(int level,
                      java.lang.String message)
Description copied from interface: ExecutionListener
Log a message

Specified by:
log in interface ExecutionListener
Specified by:
log in interface PluginLogger
Parameters:
level - the log level
message - Message being logged. null messages are not logged, however, zero-length strings are.

log

public void log(int level,
                java.lang.String message,
                java.util.Map<java.lang.String,java.lang.String> data)

getContext

public java.util.Map<java.lang.String,java.lang.String> getContext()
Description copied from interface: Contextual
Return the current context, or null.

Specified by:
getContext in interface Contextual