Package org.wildfly.clustering.context
Interface Context<T>
- Type Parameters:
T- the context value type
- All Superinterfaces:
AutoCloseable,Supplier<T>,Supplier<T>
- All Known Implementing Classes:
AbstractContext
Encapsulates some context that is applicable until
close().- Author:
- Paul Ferraro
-
Field Summary
Fields -
Method Summary
-
Field Details
-
EMPTY
-
-
Method Details
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-
empty
Returns an empty context.- Type Parameters:
T- the context value type- Returns:
- an empty context.
-
of
Returns a context that provides the specified value and invokes the specified action on close.- Type Parameters:
T- the context value type- Parameters:
value- the context valuecloseAction- the action to perform onclose().- Returns:
- a context that provides the specified value and invokes the specified action on close.
-