@Override public OperationResponse apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, handler, control, step)); } };
@Override public OperationResponse apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, handler, control, step, true)); } };
@Override public OperationResponse apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, handler, control, step)); } };
@Override public ModelNode apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, handler, control, step, permit)); } };
@Override public ModelNode apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, control, handler)); } };
@Override public OperationResponse apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, OperationMessageHandler.logging, OperationTransactionControl.COMMIT, stepHandler, false, true)); } };
@Override public ModelNode apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, model, control, handler)); } };
@Override public ModelNode apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, model, control, handler)); } };
@Override public ModelNode apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, handler, control, step, permit)); } };
@Override public OperationResponse apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, handler, control, step, true)); } };
@Override public ModelNode apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, control, handler)); } };
@Override public <T> T runInVm(PrivilegedAction<T> action) { return InVmAccess.runInVm(action); }
@Override public OperationResponse apply(DomainModelControllerService controllerService) { return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, OperationMessageHandler.logging, OperationTransactionControl.COMMIT, stepHandler, false, true)); } };
@Override public <T> T runInVm(PrivilegedAction<T> action) { return InVmAccess.runInVm(action); }
@Override public <T> T runInVm(PrivilegedAction<T> action) { return doPrivileged((PrivilegedAction<T>) () -> InVmAccess.runInVm(action)); }
@Override public <T> T runInVm(PrivilegedAction<T> action) { return doPrivileged((PrivilegedAction<T>) () -> InVmAccess.runInVm(action)); }
private static <T, U, R> R executeInVm(BiFunction<T, U, R> function, T t, U u) { try { return InVmAccess.runInVm((PrivilegedExceptionAction<R>) () -> function.apply(t, u) ); } catch (PrivilegedActionException e) { Throwable cause = e.getCause(); if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } else if (cause instanceof Error) { throw (Error) cause; } else { // Not really possible as BiFunction doesn't throw checked exceptions throw new RuntimeException(cause); } } } }
private static <T, U, R> R executeInVm(BiFunction<T, U, R> function, T t, U u) { try { return InVmAccess.runInVm((PrivilegedExceptionAction<R>) () -> function.apply(t, u) ); } catch (PrivilegedActionException e) { Throwable cause = e.getCause(); if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } else if (cause instanceof Error) { throw (Error) cause; } else { // Not really possible as BiFunction doesn't throw checked exceptions throw new RuntimeException(cause); } } } }
InVmAccess.runInVm(new PrivilegedExceptionAction<Void>() {
InVmAccess.runInVm(new PrivilegedExceptionAction<Void>() {