public interface ThlsService
| Modifier and Type | Method and Description |
|---|---|
<T,D> T |
doAs(ThlsAction<T> action,
Class<D> cls,
D data)
This method puts all the data objects on the internal thread local
storage an executes the
ThlsAction. |
<T,D,E extends Throwable> |
doAsEx(ThlsActionException<T,E> action,
Class<D> cls,
D data)
This method puts all the data objects on the internal thread local
storage an executes the
ThlsAction. |
<T,D,E extends Throwable,E2 extends Throwable> |
doAsEx2(ThlsActionException2<T,E,E2> action,
Class<D> cls,
D data)
This method puts all the data objects on the internal thread local
storage an executes the
ThlsAction. |
<T> T |
get(Class<T> cls)
Get the last object of the specified class that was put in the thread
local storage.
|
<T,D> T doAs(ThlsAction<T> action, Class<D> cls, D data)
ThlsAction.T - The type of the resulting object for the action.D - The type of the data to be put in the thread.action - The action to be executed.cls - The class of the data to be put in the thread.data - The data that must be available for the action.ThlsAction.execute() method.<T,D,E extends Throwable> T doAsEx(ThlsActionException<T,E> action, Class<D> cls, D data) throws E extends Throwable
ThlsAction.T - The type of the resulting object for the action.D - The type of the data to be put in the thread.E - The type of the first exception throw by the execution of
this action.action - The action to be executed.cls - The class of the data to be put in the thread.data - The data that must be available for the action.ThlsActionException.execute()
method.E - Exception throw by the action.E extends Throwable<T,D,E extends Throwable,E2 extends Throwable> T doAsEx2(ThlsActionException2<T,E,E2> action, Class<D> cls, D data) throws E extends Throwable, E2 extends Throwable
ThlsAction.T - The type of the resulting object for the action.D - The type of the data to be put in the thread.E - The type of the first exception throw by the execution of
this action.E2 - The type of the second exception throw by the execution of
this action.action - The action to be executed.cls - The class of the data to be put in the thread.data - The data that must be available for the action.ThlsActionException2.execute()
method.E - Exception throw by the action.E2 - The second exception throw by the action.E extends Throwable<T> T get(Class<T> cls)
T - The type of the object to look for.cls - The class of the object to look for.Copyright © 2015–2018 Bridje Framework. All rights reserved.