Package netflix.karyon.examples.hellonoss.server.simple

Examples of netflix.karyon.examples.hellonoss.server.simple.SimpleRouter


            super("httpServerA", ByteBuf.class, ByteBuf.class);
        }

        @Override
        protected void configureServer() {
            bindRouter().toInstance(new SimpleRouter());

            bind(AuthenticationService.class).to(AuthenticationServiceImpl.class);
            interceptorSupport().forUri("/*").intercept(LoggingInterceptor.class);
            interceptorSupport().forUri("/hello").interceptIn(AuthInterceptor.class);

View Full Code Here


public class RouterWithInterceptors implements RequestHandler<ByteBuf, ByteBuf> {

    private final HttpRequestHandler<ByteBuf, ByteBuf> delegate;

    public RouterWithInterceptors() {
        SimpleRouter router = new SimpleRouter();
        HttpInterceptorSupport<ByteBuf, ByteBuf> interceptorSupport = new HttpInterceptorSupport<ByteBuf, ByteBuf>();
        interceptorSupport.forUri("/*").intercept(new LoggingInterceptor());
        interceptorSupport.forUri("/hello").intercept(new AuthInterceptor(new AuthenticationServiceImpl()));
        delegate = new HttpRequestHandler<ByteBuf, ByteBuf>(router, interceptorSupport);
    }
View Full Code Here

TOP

Related Classes of netflix.karyon.examples.hellonoss.server.simple.SimpleRouter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.