Package org.platformlayer

Examples of org.platformlayer.Scope.push()


        httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        return;
      }
    }

    authenticatedScope.push();
    try {
      filterChain.doFilter(servletRequest, servletResponse);
    } finally {
      authenticatedScope.pop();
    }
View Full Code Here


        httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        return;
      }
    }

    authenticatedScope.push();
    try {
      filterChain.doFilter(servletRequest, servletResponse);
    } finally {
      authenticatedScope.pop();
    }
View Full Code Here

  @Override
  public Object call() throws OpsException {
    Scope scope = Scope.empty();
    scope.put(ProjectAuthorization.class, activeJob.getProjectAuthorization());
    try {
      scope.push();
      return doOperation();
    } finally {
      scope.pop();
    }
  }
View Full Code Here

  public static <T, E extends Exception> T runInContext(OpsContext opsContext, CheckedCallable<T, E> callable)
      throws OpsException {
    Scope scope = Scope.inherit();
    scope.put(opsContext);
    try {
      scope.push();
      return callable.call();
    } catch (Exception e) {
      log.warn("Error running operation", e);
      if (e instanceof OpsException) {
        throw ((OpsException) e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.