public class ComponentBoundary
extends java.lang.Object
The typical usage is:
public void someMethod() { ComponentBoundry.push(loggerName, this); try { ... } finally { ComponentBoundry.pop(); } }
Modifier and Type | Method and Description |
---|---|
void |
execute(java.lang.Runnable runnable)
Execute a unit of execution within this Component Boundary.
|
static ComponentBoundary |
of(java.lang.String loggerName,
java.lang.Object component) |
static Restore |
push(java.lang.String loggerName,
java.lang.Object component)
Called on entering a component method.
|
java.lang.Runnable |
wrap(java.lang.Runnable runnable)
Wrap a unit of execution in this Component Boundary.
|
public static ComponentBoundary of(java.lang.String loggerName, java.lang.Object component)
public static Restore push(java.lang.String loggerName, java.lang.Object component)
loggerName
- The new diagnostic context information.component
- The component.public java.lang.Runnable wrap(java.lang.Runnable runnable)
runnable
- The unit of execution.public void execute(java.lang.Runnable runnable)
runnable
- The unit of execution.