Esempio n. 1
0
 default void build(Action<? super BaseDirBuilder> contents, Action<? super Path> use)
     throws Exception {
   try {
     use.execute(build(contents));
   } finally {
     close();
   }
 }
 @Override
 public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
   if (!(msg instanceof FullHttpRequest)) {
     Action<Object> subscriber = channelSubscriptions.get(ctx.channel());
     if (subscriber != null) {
       subscriber.execute(msg);
       return;
     }
   }
   super.channelRead(ctx, msg);
 }
Esempio n. 3
0
 @Override
 public RequestFixture registry(Action<? super RegistrySpec> action) throws Exception {
   action.execute(registryBuilder);
   return this;
 }
Esempio n. 4
0
 default Path build(Action<? super BaseDirBuilder> contents) throws Exception {
   contents.execute(this);
   return build();
 }
Esempio n. 5
0
 @Override
 public RequestFixture serverConfig(Action<? super ServerConfigBuilder> action) throws Exception {
   serverConfigBuilder = ServerConfig.builder();
   action.execute(serverConfigBuilder);
   return this;
 }