public abstract class ExecutionContext<E extends RuntimeException> extends Object
Modifier | Constructor and Description |
---|---|
protected |
ExecutionContext(String... startLocation)
Creates a new ExecutionContext instance, starting at the given location.
|
Modifier and Type | Method and Description |
---|---|
void |
doFor(String context,
Runnable action)
Performs the given action within the specified context.
|
String[] |
getLocation()
Returns the path to the current context.
|
<T> T |
resultFor(String context,
Supplier<T> supplier)
Returns the result of the given supplier within the specified context.
|
String |
toString() |
protected abstract E |
whenFailure(Throwable e)
Returns an exception to throw for the given failure.
|
protected ExecutionContext(String... startLocation)
public <T> T resultFor(String context, Supplier<T> supplier)
public void doFor(String context, Runnable action)
protected abstract E whenFailure(Throwable e)
public String[] getLocation()
Copyright © 2024 The Cornutum Project. All rights reserved.