Package ratpack.groovy.handling.internal

Examples of ratpack.groovy.handling.internal.DefaultGroovyChain


   */
  public static Action<Chain> chainAction(@DelegatesTo(value = GroovyChain.class, strategy = Closure.DELEGATE_FIRST) final Closure<?> closure) throws Exception {
    return new Action<Chain>() {
      @Override
      public void execute(Chain chain) throws Exception {
        ClosureUtil.configureDelegateFirst(new DefaultGroovyChain(chain), closure);
      }
    };
  }
View Full Code Here


   * @param chain the chain to add handlers to
   * @param closure the definition of handlers to add
   * @throws Exception any exception thrown by {@code closure}
   */
  public static void chain(Chain chain, @DelegatesTo(value = GroovyChain.class, strategy = Closure.DELEGATE_FIRST) Closure<?> closure) throws Exception {
    GroovyChain groovyChain = chain instanceof GroovyChain ? (GroovyChain) chain : new DefaultGroovyChain(chain);
    new ClosureInvoker<Object, GroovyChain>(closure).invoke(chain.getRegistry(), groovyChain, Closure.DELEGATE_FIRST);
  }
View Full Code Here

TOP

Related Classes of ratpack.groovy.handling.internal.DefaultGroovyChain

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.