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); }
@Override public RequestFixture registry(Action<? super RegistrySpec> action) throws Exception { action.execute(registryBuilder); return this; }
default Path build(Action<? super BaseDirBuilder> contents) throws Exception { contents.execute(this); return build(); }
@Override public RequestFixture serverConfig(Action<? super ServerConfigBuilder> action) throws Exception { serverConfigBuilder = ServerConfig.builder(); action.execute(serverConfigBuilder); return this; }