public static Reactor reactor(Handler... handlers) throws IOException { Reactor reactor = Reactor.Factory.create(); for (Handler handler : handlers) { reactor.getHandler().add(handler); } return reactor; }
public static Reactor reactor(Handler... handlers) throws IOException { Reactor reactor = Reactor.Factory.create(); for (Handler handler : handlers) { reactor.getHandler().add(handler); } return reactor; } }
public static Reactor reactor(ReactorOptions options, Handler... handlers) throws IOException { Reactor reactor = Reactor.Factory.create(options); for (Handler handler : handlers) { reactor.getHandler().add(handler); } return reactor; } }
public static Reactor reactor(ReactorHandler reactorHandler, final int maxFrameSize) throws IOException { final ReactorOptions reactorOptions = new ReactorOptions(); reactorOptions.setMaxFrameSize(maxFrameSize); Reactor reactor = Proton.reactor(reactorOptions, reactorHandler); reactor.setGlobalHandler(new CustomIOHandler()); reactor.getGlobalHandler().add(new LoggingHandler()); return reactor; } }