public class TaskContext extends Object
Constructor and Description |
---|
TaskContext() |
Modifier and Type | Method and Description |
---|---|
TaskContext |
addParameter(String name,
Object value)
Adds a named parameter to the task context
|
TaskContext |
cache(Cache<?,?> cache)
The cache against which this task will be executed.
|
TaskContext |
cacheManager(EmbeddedCacheManager cacheManager)
The cache manager with which this task should be executed
|
Optional<Cache<?,?>> |
getCache()
The default cache.
|
EmbeddedCacheManager |
getCacheManager()
CacheManager for this task execution
|
Optional<Marshaller> |
getMarshaller()
Marshaller for this task execution
|
Optional<Map<String,?>> |
getParameters()
Gets a map of named parameters for the task
|
Optional<Subject> |
getSubject()
The optional
Subject which is executing this task |
boolean |
isLogEvent()
Whether executing this task will generate an event in the event log
|
TaskContext |
logEvent(boolean logEvent)
Whether execution will generate an event in the event log
|
TaskContext |
marshaller(Marshaller marshaller)
The marshaller with which this task should be executed
|
TaskContext |
parameters(Map<String,?> parameters)
A map of named parameters that will be passed to the task.
|
TaskContext |
subject(Subject subject)
The subject to impersonate when running this task.
|
String |
toString() |
public TaskContext cacheManager(EmbeddedCacheManager cacheManager)
public TaskContext marshaller(Marshaller marshaller)
public TaskContext cache(Cache<?,?> cache)
public TaskContext parameters(Map<String,?> parameters)
public TaskContext subject(Subject subject)
Security.getSubject()
public TaskContext addParameter(String name, Object value)
public TaskContext logEvent(boolean logEvent)
public EmbeddedCacheManager getCacheManager()
public Optional<Marshaller> getMarshaller()
public Optional<Cache<?,?>> getCache()
Cache.getCacheManager()
)public Optional<Map<String,?>> getParameters()
public Optional<Subject> getSubject()
Subject
which is executing this taskSubject
public boolean isLogEvent()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.