@Test public void testApp() { }
public App(StateMachineHandler stateMachineHandler) { if(stateMachineHandler == null) { throw new IllegalArgumentException("The handler cannot be null"); } acceptor = new NioSocketAcceptor(); acceptor.setDefaultLocalAddress(new InetSocketAddress(PORT)); acceptor.setReuseAddress(true); acceptor.getFilterChain().addLast("logger", new LoggingFilter()); acceptor.getFilterChain().addLast("protCodecFactory", new ProtocolCodecFilter(new TextLineCodecFactory(UTF_8))); IoHandler handler = stateMachineHandler.getIoHandler(); acceptor.setHandler(handler); }
App { public App(StateMachineHandler stateMachineHandler) { if(stateMachineHandler == null) { throw new IllegalArgumentException("The handler cannot be null"); } acceptor = new NioSocketAcceptor(); acceptor.setDefaultLocalAddress(new InetSocketAddress(PORT)); acceptor.setReuseAddress(true); acceptor.getFilterChain().addLast("logger", new LoggingFilter()); acceptor.getFilterChain().addLast("protCodecFactory", new ProtocolCodecFilter(new TextLineCodecFactory(UTF_8))); IoHandler handler = stateMachineHandler.getIoHandler(); acceptor.setHandler(handler); } }
App { public App(StateMachineHandler stateMachineHandler) { if(stateMachineHandler == null) { throw new IllegalArgumentException("The handler cannot be null"); } acceptor = new NioSocketAcceptor(); acceptor.setDefaultLocalAddress(new InetSocketAddress(PORT)); acceptor.setReuseAddress(true); acceptor.getFilterChain().addLast("logger", new LoggingFilter()); acceptor.getFilterChain().addLast("protCodecFactory", new ProtocolCodecFilter(new TextLineCodecFactory(UTF_8))); IoHandler handler = stateMachineHandler.getIoHandler(); acceptor.setHandler(handler); } App(StateMachineHandler stateMachineHandler); }
App { public App(StateMachineHandler stateMachineHandler) { if(stateMachineHandler == null) { throw new IllegalArgumentException("The handler cannot be null"); } acceptor = new NioSocketAcceptor(); acceptor.setDefaultLocalAddress(new InetSocketAddress(PORT)); acceptor.setReuseAddress(true); acceptor.getFilterChain().addLast("logger", new LoggingFilter()); acceptor.getFilterChain().addLast("protCodecFactory", new ProtocolCodecFilter(new TextLineCodecFactory(UTF_8))); IoHandler handler = stateMachineHandler.getIoHandler(); acceptor.setHandler(handler); } App(StateMachineHandler stateMachineHandler); void start(); static void main(String[] args); }
App { public App(StateMachineHandler stateMachineHandler) { if(stateMachineHandler == null) { throw new IllegalArgumentException("The handler cannot be null"); } acceptor = new NioSocketAcceptor(); acceptor.setDefaultLocalAddress(new InetSocketAddress(PORT)); acceptor.setReuseAddress(true); acceptor.getFilterChain().addLast("logger", new LoggingFilter()); acceptor.getFilterChain().addLast("protCodecFactory", new ProtocolCodecFilter(new TextLineCodecFactory(UTF_8))); IoHandler handler = stateMachineHandler.getIoHandler(); acceptor.setHandler(handler); } App(StateMachineHandler stateMachineHandler); void start(); static void main(String[] args);  }