Esempio n. 1
0
 static GroovyEmbeddedApp of(
     @DelegatesTo(value = GroovyRatpackServerSpec.class, strategy = Closure.DELEGATE_FIRST)
         Closure<?> definition)
     throws Exception {
   return from(
       EmbeddedApp.of(
           s -> ClosureUtil.configureDelegateFirst(GroovyRatpackServerSpec.from(s), definition)));
 }
Esempio n. 2
0
 static GroovyEmbeddedApp fromServer(
     ServerConfig serverConfig,
     @DelegatesTo(value = GroovyRatpackServerSpec.class, strategy = Closure.DELEGATE_FIRST)
         Closure<?> definition) {
   return from(
       EmbeddedApp.fromServer(
           serverConfig,
           s -> ClosureUtil.configureDelegateFirst(GroovyRatpackServerSpec.from(s), definition)));
 }
Esempio n. 3
0
 static GroovyEmbeddedApp fromHandlers(
     @DelegatesTo(value = GroovyChain.class, strategy = Closure.DELEGATE_FIRST)
         Closure<?> handlers) {
   return from(EmbeddedApp.fromHandlers(Groovy.chainAction(handlers)));
 }
Esempio n. 4
0
 static GroovyEmbeddedApp fromHandler(
     @DelegatesTo(value = GroovyContext.class, strategy = Closure.DELEGATE_FIRST)
         Closure<?> handler) {
   return from(EmbeddedApp.fromHandler(Groovy.groovyHandler(handler)));
 }