Package br.com.caelum.vraptor.interceptor

Examples of br.com.caelum.vraptor.interceptor.Interceptor


      accepts = getAcceptor().accepts(method);
    } catch (NullPointerException e) {
      throw new InterceptionException("StaticInterceptors should not use constructor parameters inside the accepts method", e);
    }
    if (accepts) {
      Interceptor interceptor = container.instanceFor(type);
      if (interceptor == null) {
        throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
            + ": the container returned null.");
      }
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, resourceInstance);
    } else {
      stack.next(method, resourceInstance);
    }

  }
View Full Code Here


    this.type = type;
  }

  public void execute(InterceptorStack stack, ResourceMethod method, Object resourceInstance)
      throws InterceptionException {
    Interceptor interceptor = Interceptor.class.cast(container.instanceFor(type));
    if (interceptor == null) {
      throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
          + ": the container returned null.");
    }
    if (interceptor.accepts(method)) {
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, resourceInstance);
    } else {
      stack.next(method, resourceInstance);
    }
  }
View Full Code Here

  }

  @Override
  public void execute(InterceptorStack stack, ControllerMethod method, Object controllerInstance)
      throws InterceptionException {
    Interceptor interceptor = (Interceptor) container.instanceFor(type);
    if (interceptor == null) {
      throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
          + ": the container returned null.");
    }
    if (interceptor.accepts(method)) {
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, controllerInstance);
    } else {
      stack.next(method, controllerInstance);
    }
  }
View Full Code Here

  }

  @Override
  public void execute(InterceptorStack stack, ControllerMethod method, Object controllerInstance)
      throws InterceptionException {
    Interceptor interceptor = (Interceptor) container.instanceFor(type);
    if (interceptor == null) {
      throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
          + ": the container returned null.");
    }
    if (interceptor.accepts(method)) {
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, controllerInstance);
    } else {
      stack.next(method, controllerInstance);
    }
  }
View Full Code Here

    this.type = type;
  }

  public void execute(InterceptorStack stack, ControllerMethod method, Object controllerInstance)
      throws InterceptionException {
    Interceptor interceptor = (Interceptor) container.instanceFor(type);
    if (interceptor == null) {
      throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
          + ": the container returned null.");
    }
    if (interceptor.accepts(method)) {
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, controllerInstance);
    } else {
      stack.next(method, controllerInstance);
    }
  }
View Full Code Here

      accepts = getAcceptor().accepts(method);
    } catch (NullPointerException e) {
      throw new InterceptionException("StaticInterceptors should not use constructor parameters inside the accepts method", e);
    }
    if (accepts) {
      Interceptor interceptor = container.instanceFor(type);
      if (interceptor == null) {
        throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
            + ": the container returned null.");
      }
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, resourceInstance);
    } else {
      stack.next(method, resourceInstance);
    }

  }
View Full Code Here

    this.type = type;
  }

  public void execute(InterceptorStack stack, ResourceMethod method, Object resourceInstance)
      throws InterceptionException {
    Interceptor interceptor = container.instanceFor(type);
    if (interceptor == null) {
      throw new InterceptionException("Unable to instantiate interceptor for " + type.getName()
          + ": the container returned null.");
    }
    if (interceptor.accepts(method)) {
      logger.debug("Invoking interceptor {}", interceptor.getClass().getSimpleName());
      interceptor.intercept(stack, method, resourceInstance);
    } else {
      stack.next(method, resourceInstance);
    }
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.interceptor.Interceptor

Copyright © 2018 www.massapicom. 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.