예제 #1
0
 default void build(Action<? super BaseDirBuilder> contents, Action<? super Path> use)
     throws Exception {
   try {
     use.execute(build(contents));
   } finally {
     close();
   }
 }
예제 #2
0
 @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);
 }
예제 #3
0
 @Override
 public RequestFixture registry(Action<? super RegistrySpec> action) throws Exception {
   action.execute(registryBuilder);
   return this;
 }
예제 #4
0
 default Path build(Action<? super BaseDirBuilder> contents) throws Exception {
   contents.execute(this);
   return build();
 }
예제 #5
0
 @Override
 public RequestFixture serverConfig(Action<? super ServerConfigBuilder> action) throws Exception {
   serverConfigBuilder = ServerConfig.builder();
   action.execute(serverConfigBuilder);
   return this;
 }