public static interface CauseStackManager.StackFrame extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
<T> CauseStackManager.StackFrame |
addContext(EventContextKey<T> key,
T value)
Adds the given object to the current context under the given key.
|
void |
close() |
Cause |
getCurrentCause()
Gets the current
Cause object from the current cause stack. |
EventContext |
getCurrentContext()
Gets an
EventContext object on the current contextual
information. |
Object |
popCause()
Pops the most recently pushed cause object off of the stack and
returns it.
|
CauseStackManager.StackFrame |
pushCause(Object obj)
Pushes an object to the current cause stack which will associate
it with all events through from api actions until it is
popped off again.
|
<T> Optional<T> |
removeContext(EventContextKey<T> key)
Removes the given context key from the current context.
|
Cause getCurrentCause()
Cause
object from the current cause stack.CauseStackManager.getCurrentCause()
EventContext getCurrentContext()
EventContext
object on the current contextual
information.CauseStackManager.getCurrentContext()
CauseStackManager.StackFrame pushCause(Object obj)
obj
- The object to push to the stackCauseStackManager.pushCause(Object)
Object popCause()
CauseStackManager.popCause()
<T> CauseStackManager.StackFrame addContext(EventContextKey<T> key, T value)
key
- The context keyvalue
- The objectEventContextKeys
,
CauseStackManager.addContext(EventContextKey, Object)
<T> Optional<T> removeContext(EventContextKey<T> key)
key
- The key to clearEventContextKeys
,
CauseStackManager.removeContext(EventContextKey)
void close()
close
in interface AutoCloseable