Package org.oddjob.framework.util
Class ComponentBoundary
java.lang.Object
org.oddjob.framework.util.ComponentBoundary
Handles the crossover between components. This should probably be done with
AOP but for now well do it long hand.
The typical usage is:
public void someMethod() {
ComponentBoundry.push(loggerName, this);
try {
...
}
finally {
ComponentBoundry.pop();
}
}
- Author:
- rob
-
Method Summary
Modifier and TypeMethodDescriptionvoidExecute a unit of execution within this Component Boundary.static ComponentBoundarystatic RestoreCalled on entering a component method.Wrap a unit of execution in this Component Boundary.
-
Method Details
-
of
-
push
Called on entering a component method.- Parameters:
loggerName- The new diagnostic context information.component- The component.
-
wrap
Wrap a unit of execution in this Component Boundary.- Parameters:
runnable- The unit of execution.- Returns:
- A new unit of execution that will execute within this Component Boundary.
-
execute
Execute a unit of execution within this Component Boundary.- Parameters:
runnable- The unit of execution.
-