Interface ExecutionContext
-
- All Known Subinterfaces:
NodeExecutionContext
,StepExecutionContext
- All Known Implementing Classes:
ExecutionContextImpl
public interface ExecutionContext
ExecutionContext is ...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description <T> java.util.Optional<T>
componentForType(java.lang.Class<T> type)
<T> java.util.Collection<T>
componentsForType(java.lang.Class<T> type)
com.dtolabs.rundeck.core.authorization.AuthContext
getAuthContext()
Deprecated.java.lang.String
getCharsetEncoding()
java.util.List<ContextComponent<?>>
getComponentList()
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>
getDataContext()
Return data context setDataContext
getDataContextObject()
ExecutionReference
getExecution()
Gets a reference to the execution being processed.ExecutionListener
getExecutionListener()
ExecutionLogger
getExecutionLogger()
Framework
getFramework()
Deprecated.usegetIFramework()
java.lang.String
getFrameworkProject()
Get the framework project nameIFramework
getIFramework()
JobService
getJobService()
LoggingManager
getLoggingManager()
int
getLoglevel()
Return the loglevel value, using the Ant equivalents: DEBUG=1,java.lang.String
getNodeRankAttribute()
INodeSet
getNodes()
Return the node selectorNodesSelector
getNodeSelector()
Return the node selectorProjectNodeService
getNodeService()
OrchestratorConfig
getOrchestrator()
SharedOutputContext
getOutputContext()
PluginControlService
getPluginControlService()
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>
getPrivateDataContext()
DataContext
getPrivateDataContextObject()
MultiDataContext<ContextView,DataContext>
getSharedDataContext()
StorageTree
getStorageTree()
int
getThreadCount()
java.lang.String
getUser()
com.dtolabs.rundeck.core.authorization.UserAndRolesAuthContext
getUserAndRolesAuthContext()
WorkflowExecutionListener
getWorkflowExecutionListener()
boolean
isKeepgoing()
boolean
isNodeRankOrderAscending()
<T> int
useAllComponentsOfType(java.lang.Class<T> type, java.util.function.Consumer<T> consumer)
apply the consumer to components of the given type, and remove "useOnce" components after use<T> java.util.Optional<T>
useSingleComponentOfType(java.lang.Class<T> type)
apply the consumer to a single component of the given type, and remove the component if it is "useOnce"<T> boolean
useSingleComponentOfType(java.lang.Class<T> type, java.util.function.Consumer<java.util.Optional<T>> consumer)
apply the consumer to a single component of the given type, and remove the component if it is "useOnce"
-
-
-
Method Detail
-
getFrameworkProject
java.lang.String getFrameworkProject()
Get the framework project name- Returns:
- project name
-
getFramework
Framework getFramework()
Deprecated.usegetIFramework()
- Returns:
- the framework
-
getIFramework
IFramework getIFramework()
- Returns:
- the framework
-
getAuthContext
com.dtolabs.rundeck.core.authorization.AuthContext getAuthContext()
Deprecated.- Returns:
- the authorization context
-
getUserAndRolesAuthContext
com.dtolabs.rundeck.core.authorization.UserAndRolesAuthContext getUserAndRolesAuthContext()
-
getStorageTree
StorageTree getStorageTree()
- Returns:
- the storage service
-
getJobService
JobService getJobService()
- Returns:
- the job service
-
getComponentList
java.util.List<ContextComponent<?>> getComponentList()
- Returns:
- context components
-
getNodeService
ProjectNodeService getNodeService()
- Returns:
- the node service
-
getUser
java.lang.String getUser()
- Returns:
- username
-
getNodeSelector
NodesSelector getNodeSelector()
Return the node selector- Returns:
- nodeset
-
getNodes
INodeSet getNodes()
Return the node selector- Returns:
- nodeset
-
getThreadCount
int getThreadCount()
- Returns:
- node dispatch threadcount
-
getNodeRankAttribute
java.lang.String getNodeRankAttribute()
- Returns:
- the node rank attribute to use for ranking
-
isNodeRankOrderAscending
boolean isNodeRankOrderAscending()
- Returns:
- true if the node rank order is ascending
-
isKeepgoing
boolean isKeepgoing()
- Returns:
- node dispatch keepgoing
-
getLoglevel
int getLoglevel()
Return the loglevel value, using the Ant equivalents: DEBUG=1,- Returns:
- log level from 0-4: ERR,WARN,INFO,VERBOSE,DEBUG
-
getCharsetEncoding
java.lang.String getCharsetEncoding()
- Returns:
- the charset encoding to use for handling output, or null for default
-
getDataContext
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getDataContext()
Return data context set- Returns:
- map of data contexts keyed by name
-
getDataContextObject
DataContext getDataContextObject()
-
componentsForType
<T> java.util.Collection<T> componentsForType(java.lang.Class<T> type)
- Type Parameters:
T
-- Parameters:
type
-- Returns:
- collection of components of specified type
-
useAllComponentsOfType
<T> int useAllComponentsOfType(java.lang.Class<T> type, java.util.function.Consumer<T> consumer)
apply the consumer to components of the given type, and remove "useOnce" components after use- Type Parameters:
T
-- Parameters:
type
-consumer
-
-
componentForType
<T> java.util.Optional<T> componentForType(java.lang.Class<T> type)
- Type Parameters:
T
-- Parameters:
type
-- Returns:
- a single component for the given type
-
useSingleComponentOfType
<T> boolean useSingleComponentOfType(java.lang.Class<T> type, java.util.function.Consumer<java.util.Optional<T>> consumer)
apply the consumer to a single component of the given type, and remove the component if it is "useOnce"- Type Parameters:
T
-- Parameters:
type
-- Returns:
- a single component for the given type
-
useSingleComponentOfType
<T> java.util.Optional<T> useSingleComponentOfType(java.lang.Class<T> type)
apply the consumer to a single component of the given type, and remove the component if it is "useOnce"- Type Parameters:
T
-- Parameters:
type
-- Returns:
- optional component object
-
getSharedDataContext
MultiDataContext<ContextView,DataContext> getSharedDataContext()
- Returns:
- the node specific context data keyed by node name
-
getPrivateDataContext
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getPrivateDataContext()
- Returns:
- the data context in the private scope
-
getPrivateDataContextObject
DataContext getPrivateDataContextObject()
-
getExecutionListener
ExecutionListener getExecutionListener()
-
getWorkflowExecutionListener
WorkflowExecutionListener getWorkflowExecutionListener()
-
getExecutionLogger
ExecutionLogger getExecutionLogger()
-
getOrchestrator
OrchestratorConfig getOrchestrator()
-
getOutputContext
SharedOutputContext getOutputContext()
- Returns:
- context for emitting new data
-
getLoggingManager
LoggingManager getLoggingManager()
- Returns:
- manager for capturing logs
-
getPluginControlService
PluginControlService getPluginControlService()
-
getExecution
ExecutionReference getExecution()
Gets a reference to the execution being processed.- Returns:
- An
ExecutionReference
to the execution, or null if doesn't apply.
-
-