Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 892 Bytes

README.md

File metadata and controls

31 lines (23 loc) · 892 Bytes

Web application created primarily for learning purposes (mainly of Netty) - additionally entire stack call pretend to be non-blocking

Actually mapping looks like

(Route.just("/", PUT), new HomeHandler());

maps to

public class HomeHandler extends SimpleChannelInboundHandler<Request>
{
	@Override
	protected void channelRead0(final ChannelHandlerContext ctx, final Request request) throws Exception
	{
		supplyAsync(() -> new Response(HttpResponseStatus.NO_CONTENT, "Hello World"), ConcurrencyManager.HTTP_OPERATION_STAGE)//
				.thenAcceptAsync(response -> //
						ctx.writeAndFlush(response)//
								.addListener(ChannelFutureListener.CLOSE));
	}

}

#Powered by