public final class BusinessTransactionState extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BusinessTransactionState.InitialState
Describes the initial state of a new business transaction.
|
Modifier and Type | Method and Description |
---|---|
static void |
clear()
Removes the top business transaction state from the stack bound to the current thread.
|
static void |
ensureInitialized(Function2<com.google.common.base.Optional<BusinessTransactionState>,BusinessTransactionState.InitialState,Map<String,Object>> initializationAction)
Initializes the business transactions on the stack bound to the current thread from outermost to innermost.
|
static com.google.common.base.Optional<BusinessTransactionState> |
get()
Returns the top business transaction state from the stack bound to the current thread.
|
<T> com.google.common.base.Optional<T> |
getAttribute(String attributeName,
Class<T> expectedType)
Returns the value of the attribute with the given name from the active state of the business transaction.
|
static com.google.common.base.Optional<BusinessTransactionState> |
getBottom()
Returns the bottom business transaction state from the stack bound to the current thread.
|
static BusinessTransactionState |
pushWith(BusinessTransactionState.InitialState initialState)
Pushes a new business transaction state onto the top of the stack bound to the current thread.
|
public <T> com.google.common.base.Optional<T> getAttribute(String attributeName, Class<T> expectedType)
T
- the type of the classattributeName
- the name of the attributeexpectedType
- the expected type of the attribute valuepublic static BusinessTransactionState pushWith(BusinessTransactionState.InitialState initialState)
ensureInitialized(Function2)
for the first time.initialState
- the initial state of the new business transactionpublic static com.google.common.base.Optional<BusinessTransactionState> get()
public static com.google.common.base.Optional<BusinessTransactionState> getBottom()
public static void clear()
public static void ensureInitialized(Function2<com.google.common.base.Optional<BusinessTransactionState>,BusinessTransactionState.InitialState,Map<String,Object>> initializationAction)
initializationAction
- the action that processes the current initial state, never nullCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.