Tabnine Logo
SecurityActions.privilegedExecution
Code IndexAdd Tabnine to your IDE (free)

How to use
privilegedExecution
method
in
org.jboss.as.host.controller.SecurityActions

Best Java code snippets using org.jboss.as.host.controller.SecurityActions.privilegedExecution (Showing top 16 results out of 315)

origin: org.wildfly.core/wildfly-host-controller

@Override
public OperationResponse executeAndAttemptLock(Operation operation, OperationMessageHandler handler,
    OperationTransactionControl control, OperationStepHandler step) {
  Function<DomainModelControllerService, OperationResponse> function = new Function<DomainModelControllerService, OperationResponse>() {
    @Override
    public OperationResponse apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, handler, control, step, true));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this);
}
origin: org.wildfly.core/wildfly-host-controller

@Override
public ModelNode executeReadOnly(ModelNode operation, OperationStepHandler handler, OperationTransactionControl control) {
  Function<DomainModelControllerService, ModelNode> function = new Function<DomainModelControllerService, ModelNode>() {
    @Override
    public ModelNode apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, control,  handler));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this);
}
origin: org.wildfly.core/wildfly-host-controller

@Override
public ModelNode executeReadOnly(ModelNode operation, Resource model, OperationStepHandler handler, OperationTransactionControl control) {
  Function<DomainModelControllerService, ModelNode> function = new Function<DomainModelControllerService, ModelNode>() {
    @Override
    public ModelNode apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, model, control, handler));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this);
}
origin: org.wildfly.core/wildfly-host-controller

@Override
@SuppressWarnings("deprecation")
public ModelNode joinActiveOperation(ModelNode operation, OperationMessageHandler handler,
                   OperationTransactionControl control,
                   OperationStepHandler step, int permit) {
  Function<DomainModelControllerService, ModelNode> function = new Function<DomainModelControllerService, ModelNode>() {
    @Override
    public ModelNode apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, handler, control, step, permit));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this);
}
origin: wildfly/wildfly-core

@Override
public OperationResponse executeAndAttemptLock(Operation operation, OperationMessageHandler handler,
    OperationTransactionControl control, OperationStepHandler step) {
  Function<DomainModelControllerService, OperationResponse> function = new Function<DomainModelControllerService, OperationResponse>() {
    @Override
    public OperationResponse apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, handler, control, step, true));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this);
}
origin: wildfly/wildfly-core

@Override
public ModelNode executeReadOnly(ModelNode operation, OperationStepHandler handler, OperationTransactionControl control) {
  Function<DomainModelControllerService, ModelNode> function = new Function<DomainModelControllerService, ModelNode>() {
    @Override
    public ModelNode apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, control,  handler));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this);
}
origin: wildfly/wildfly-core

@Override
public ModelNode executeReadOnly(ModelNode operation, Resource model, OperationStepHandler handler, OperationTransactionControl control) {
  Function<DomainModelControllerService, ModelNode> function = new Function<DomainModelControllerService, ModelNode>() {
    @Override
    public ModelNode apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, model, control, handler));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this);
}
origin: wildfly/wildfly-core

@Override
@SuppressWarnings("deprecation")
public ModelNode joinActiveOperation(ModelNode operation, OperationMessageHandler handler,
                   OperationTransactionControl control,
                   OperationStepHandler step, int permit) {
  Function<DomainModelControllerService, ModelNode> function = new Function<DomainModelControllerService, ModelNode>() {
    @Override
    public ModelNode apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<ModelNode>) () -> controllerService.executeReadOnlyOperation(operation, handler, control, step, permit));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this);
}
origin: org.wildfly.core/wildfly-host-controller

/**
 * Execute the given function, in a privileged block if a security manager is checking.
 * @param function the function
 * @param t        the argument to the function
 * @param <T>      the type of the argument to the function
 * @param <R>      the type of the function return value
 * @return         the return value of the function
 */
static <T, R> R privilegedExecution(Function<T, R> function, T t) {
  return privilegedExecution().execute(function, t);
}
origin: org.wildfly.core/wildfly-host-controller

@Override
public ModelNode execute(Operation operation, OperationMessageHandler handler, OperationTransactionControl control,
    OperationStepHandler step) {
  Function<DomainModelControllerService, OperationResponse> function = new Function<DomainModelControllerService, OperationResponse>() {
    @Override
    public OperationResponse apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, handler, control, step));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this).getResponseNode();
}
origin: wildfly/wildfly-core

/**
 * Execute the given function, in a privileged block if a security manager is checking.
 * @param function the function
 * @param t        the argument to the function
 * @param <T>      the type of the argument to the function
 * @param <R>      the type of the function return value
 * @return         the return value of the function
 */
static <T, R> R privilegedExecution(Function<T, R> function, T t) {
  return privilegedExecution().execute(function, t);
}
origin: wildfly/wildfly-core

/**
 * Execute the given function, in a privileged block if a security manager is checking.
 * @param function the function
 * @param t        the first argument to the function
 * @param u        the second argument to the function
 * @param <T>      the type of the first argument to the function
 * @param <U>      the type of the second argument to the function
 * @param <R>      the type of the function return value
 * @return         the return value of the function
 */
static <T, U, R> R privilegedExecution(BiFunction<T, U, R> function, T t, U u) {
  return privilegedExecution().execute(function, t, u);
}
origin: wildfly/wildfly-core

@Override
public ModelNode execute(Operation operation, OperationMessageHandler handler, OperationTransactionControl control,
    OperationStepHandler step) {
  Function<DomainModelControllerService, OperationResponse> function = new Function<DomainModelControllerService, OperationResponse>() {
    @Override
    public OperationResponse apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, handler, control, step));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this).getResponseNode();
}
origin: org.wildfly.core/wildfly-host-controller

/**
 * Execute the given function, in a privileged block if a security manager is checking.
 * @param function the function
 * @param t        the first argument to the function
 * @param u        the second argument to the function
 * @param <T>      the type of the first argument to the function
 * @param <U>      the type of the second argument to the function
 * @param <R>      the type of the function return value
 * @return         the return value of the function
 */
static <T, U, R> R privilegedExecution(BiFunction<T, U, R> function, T t, U u) {
  return privilegedExecution().execute(function, t, u);
}
origin: wildfly/wildfly-core

@Override
public ModelNode installSlaveExtensions(List<ModelNode> extensions) {
  Operation operation = ApplyExtensionsHandler.getOperation(extensions);
  OperationStepHandler stepHandler = modelNodeRegistration.getOperationHandler(PathAddress.EMPTY_ADDRESS, ApplyExtensionsHandler.OPERATION_NAME);
  Function<DomainModelControllerService, OperationResponse> function = new Function<DomainModelControllerService, OperationResponse>() {
    @Override
    public OperationResponse apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, OperationMessageHandler.logging, OperationTransactionControl.COMMIT, stepHandler, false, true));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this).getResponseNode();
}
origin: org.wildfly.core/wildfly-host-controller

@Override
public ModelNode installSlaveExtensions(List<ModelNode> extensions) {
  Operation operation = ApplyExtensionsHandler.getOperation(extensions);
  OperationStepHandler stepHandler = modelNodeRegistration.getOperationHandler(PathAddress.EMPTY_ADDRESS, ApplyExtensionsHandler.OPERATION_NAME);
  Function<DomainModelControllerService, OperationResponse> function = new Function<DomainModelControllerService, OperationResponse>() {
    @Override
    public OperationResponse apply(DomainModelControllerService controllerService) {
      return InVmAccess.runInVm((PrivilegedAction<OperationResponse>) () -> controllerService.internalExecute(operation, OperationMessageHandler.logging, OperationTransactionControl.COMMIT, stepHandler, false, true));
    }
  };
  return SecurityActions.privilegedExecution(function, DomainModelControllerService.this).getResponseNode();
}
org.jboss.as.host.controllerSecurityActionsprivilegedExecution

Javadoc

Provides function execution in a doPrivileged block if a security manager is checking privileges

Popular methods of SecurityActions

  • getSystemEnvironment
  • getSystemProperties
  • getSystemProperty
  • setSystemProperty

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Path (java.nio.file)
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JList (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now