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));
}
}