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)
TaskContextAdapter
TaskContext.log(String, Object...)
is called in the attached context.log
in interface TaskContextAdapter
message
- the message to logpublic void trace(String message)
TaskContextAdapter
TaskContext.trace(String, Object...)
is called in the attached context.trace
in interface TaskContextAdapter
message
- the message to logpublic void setState(String message)
TaskContextAdapter
TaskContext.setState(String, Object...)
is called in the attached
context.setState
in interface TaskContextAdapter
message
- the message to set as statepublic void markErroneous()
TaskContextAdapter
TaskContext.markErroneous()
is called in the attached context.markErroneous
in interface TaskContextAdapter
public void cancel()
TaskContextAdapter
TaskContext.cancel()
is called in the attached context.cancel
in interface TaskContextAdapter
public boolean isActive()
TaskContextAdapter
isActive
in interface TaskContextAdapter
Copyright © 2018. All rights reserved.