public class BasicTaskContextAdapter extends Object implements TaskContextAdapter
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cancelled |
protected TaskContext |
ctx |
protected boolean |
erroneous |
protected String |
state |
| Constructor and Description |
|---|
BasicTaskContextAdapter(TaskContext ctx)
Creates a new BasicTaskContextAdapter for the given TaskContext.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Invoked if
TaskContext.cancel() is called in the attached context. |
boolean |
isActive()
Determines if the current task is still "active" and processing should continue.
|
void |
log(String message)
Invoked if
TaskContext.log(String, Object...) is called in the attached context. |
void |
markErroneous()
Invoked if
TaskContext.markErroneous() is called in the attached context. |
void |
setState(String message)
Invoked if
TaskContext.setState(String, Object...) is called in the attached
context. |
void |
trace(String message)
Invoked if
TaskContext.trace(String, Object...) is called in the attached context. |
protected volatile boolean cancelled
protected volatile boolean erroneous
protected String state
protected TaskContext ctx
public BasicTaskContextAdapter(TaskContext ctx)
ctx - the current task context for which this adapter is createdpublic void log(String message)
TaskContextAdapterTaskContext.log(String, Object...) is called in the attached context.log in interface TaskContextAdaptermessage - the message to logpublic void trace(String message)
TaskContextAdapterTaskContext.trace(String, Object...) is called in the attached context.trace in interface TaskContextAdaptermessage - the message to logpublic void setState(String message)
TaskContextAdapterTaskContext.setState(String, Object...) is called in the attached
context.setState in interface TaskContextAdaptermessage - the message to set as statepublic void markErroneous()
TaskContextAdapterTaskContext.markErroneous() is called in the attached context.markErroneous in interface TaskContextAdapterpublic void cancel()
TaskContextAdapterTaskContext.cancel() is called in the attached context.cancel in interface TaskContextAdapterpublic boolean isActive()
TaskContextAdapterisActive in interface TaskContextAdapterCopyright © 2018. All rights reserved.