Examples of InterceptorStatusToken


Examples of org.springframework.security.access.intercept.InterceptorStatusToken

        final SecurityChecker secChecker = this.securityChecker;
        MethodAdvice securedMethodAdvice = new MethodAdvice() {
         
          public void advise(MethodInvocation invocation) {
           
              InterceptorStatusToken statusTokenVal = secChecker.checkBefore(confAttrHolder);
              tokenFieldHandle.set(invocation.getInstance(), statusTokenVal);
               
                invocation.proceed();

                InterceptorStatusToken tokenFieldValue = (InterceptorStatusToken) tokenFieldHandle.get(invocation.getInstance());
                secChecker.checkAfter(tokenFieldValue, null);
            }
        };

        method.addAdvice(securedMethodAdvice);
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

     *        a simple {@code return proceed();} statement
     *
     * @return The returned value from the method invocation
     */
    public Object invoke(JoinPoint jp, AspectJCallback advisorProceed) {
        InterceptorStatusToken token = super.beforeInvocation(new MethodInvocationAdapter(jp));

        Object result;
        try {
            result = advisorProceed.proceedWithObject();
        }finally {
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

     * @return The returned value from the method invocation (possibly modified by the {@code AfterInvocationManager}).
     *
     * @throws Throwable if any error occurs
     */
    public Object invoke(MethodInvocation mi) throws Throwable {
        InterceptorStatusToken token = super.beforeInvocation(mi);

        Object result;
        try {
            result = mi.proceed();
        } finally {
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

            // first time this request being called, so perform security checking
            if (fi.getRequest() != null) {
                fi.getRequest().setAttribute(FILTER_APPLIED, Boolean.TRUE);
            }

            InterceptorStatusToken token = super.beforeInvocation(fi);

            try {
                fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
            } finally {
                super.finallyInvocation(token);
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

    public SecurityMetadataSource obtainSecurityMetadataSource() {
        return metadataSource;
    }

    public Message<?> preSend(Message<?> message, MessageChannel channel) {
        InterceptorStatusToken token = beforeInvocation(message);
        if(token != null) {
            tokenHolder.set(token);
        }
        return message;
    }
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

        }
        return message;
    }

    public void postSend(Message<?> message, MessageChannel channel, boolean sent) {
        InterceptorStatusToken token = clearToken();
        afterInvocation(token, null);
    }
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

        InterceptorStatusToken token = clearToken();
        afterInvocation(token, null);
    }

    public void afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, Exception ex) {
        InterceptorStatusToken token = clearToken();
        finallyInvocation(token);
    }
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

    public void afterReceiveCompletion(Message<?> message, MessageChannel channel, Exception ex) {
    }

    private InterceptorStatusToken clearToken() {
        InterceptorStatusToken token = tokenHolder.get();
        tokenHolder.remove();
        return token;
    }
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

          // first time this request being called, so perform security checking
          if (fi.getRequest() != null) {
              fi.getRequest().setAttribute(FILTER_APPLIED, Boolean.TRUE);
          }

          InterceptorStatusToken token = super.beforeInvocation(fi);

          try {
              fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
          } finally {
              super.afterInvocation(token, null);
View Full Code Here

Examples of org.springframework.security.access.intercept.InterceptorStatusToken

     *
     * @throws Throwable if any error occurs
     */
    public Object invoke(MethodInvocation mi) throws Throwable {
        Object result = null;
        InterceptorStatusToken token = super.beforeInvocation(mi);

        try {
            result = mi.proceed();
        } finally {
            result = super.afterInvocation(token, result);
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.