@Override public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { // TODO Auto-generated method stub return super.finishDecode(out); }
private void cleanup() { if (!initialized) { throw new IllegalStateException(); } initialized = false; childProducts.clear(); try { destroy(); } catch (Exception e2) { log.warn("Failed to destroy a decoding state machine.", e2); } }
private DecodingState getCurrentState() throws Exception { DecodingState state = this.currentState; if (state == null) { state = init(); initialized = true; } return state; } }
@Override public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { DecodingState state = super.decode(in, out); flush(childProducts, out); return state; }
throws Exception { DecodingState nextState; DecodingState state = getCurrentState(); try { for (;;) { } finally { this.currentState = state; nextState = finishDecode(childProducts, out); if (state == null) { cleanup();
@Override public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { DecodingState state = super.decode(in, out); flush(childProducts, out); return state; }
@Override public DecodingState decode(IoBuffer in, final ProtocolDecoderOutput out) throws Exception { DecodingState state = getCurrentState(); return finishDecode(childProducts, out); cleanup();
@Override public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { DecodingState decodingState = super.decode(in, out); flush(childProducts, out); return decodingState; }
@Override public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { DecodingState decodingState = super.decode(in, out); flush(childProducts, out); return decodingState; }
@Override public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { DecodingState decodingState = super.decode(in, out); flush(childProducts, out); return decodingState; }
@Override public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { DecodingState decodingState = super.decode(in, out); flush(childProducts, out); return decodingState; }