Skip to content

KowalczykBartek/netty-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages