Package org.jboss.as.controller.access
Class InVmAccess
- java.lang.Object
-
- org.jboss.as.controller.access.InVmAccess
-
public final class InVmAccess extends Object
Utility class for executing in-vm calls.- Author:
- Darran Lofthouse
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isInVmCall()
Is the current call an in-vm call?static <T> T
runInVm(PrivilegedAction<T> action)
Run an action as an in-vm action.static <T> T
runInVm(PrivilegedExceptionAction<T> action)
Run an action as an in-vm action.
-
-
-
Method Detail
-
runInVm
public static <T> T runInVm(PrivilegedAction<T> action)
Run an action as an in-vm action.- Type Parameters:
T
- the action return type- Parameters:
action
- the action to run- Returns:
- the action result (may be
null
)
-
runInVm
public static <T> T runInVm(PrivilegedExceptionAction<T> action) throws PrivilegedActionException
Run an action as an in-vm action.- Type Parameters:
T
- the action return type- Parameters:
action
- the action to run- Returns:
- the action result (may be
null
) - Throws:
PrivilegedActionException
- if the action fails
-
isInVmCall
public static boolean isInVmCall()
Is the current call an in-vm call?- Returns:
true
if the current call is an in-vm call,false
otherwise.
-
-