Class OpenTracingAsyncTaskListener
- java.lang.Object
-
- org.hawaiiframework.async.task_listener.OpenTracingAsyncTaskListener
-
- All Implemented Interfaces:
TaskListener,org.springframework.core.Ordered
public class OpenTracingAsyncTaskListener extends Object implements TaskListener
Task listener for open tracing's Tracer. Should be executed first upon start and last upon finish.The task listener creates a span for each async invocation.
Ordered at -200.
-
-
Constructor Summary
Constructors Constructor Description OpenTracingAsyncTaskListener(io.opentracing.Tracer tracer, io.opentracing.Span parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinish()Called just after a task is finished.intgetOrder()voidsetSharedTaskContext(SharedTaskContext sharedTaskContext)Set the shared task context in this task context.voidstartExecution()Called just before the task is started.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hawaiiframework.async.task_listener.TaskListener
timeout
-
-
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setSharedTaskContext
public void setSharedTaskContext(SharedTaskContext sharedTaskContext)
Description copied from interface:TaskListenerSet the shared task context in this task context. Invoked before the set.- Specified by:
setSharedTaskContextin interfaceTaskListener- Parameters:
sharedTaskContext- the shared task context.
-
startExecution
public void startExecution()
Description copied from interface:TaskListenerCalled just before the task is started.- Specified by:
startExecutionin interfaceTaskListener
-
finish
public void finish()
Description copied from interface:TaskListenerCalled just after a task is finished.- Specified by:
finishin interfaceTaskListener
-
-