@Override public NetServerSpec getObject() throws Exception { spec.listen(host, port); if (null != framing) { if ("linefeed".equals(framing)) { spec.codec(new DelimitedCodec(delegateCodec)); } else if ("length".equals(framing)) { spec.codec(new LengthFieldCodec(lengthFieldLength, delegateCodec)); } } return spec; }
public NetServerSpecFactoryBean setDispatcher(Dispatcher dispatcher) { spec.dispatcher(dispatcher); return this; }