@Test public void testPartialHeader() throws Exception { setUpBuffer("8=FIX.4.2"); assertEquals("wrong result", MessageDecoderResult.NEED_DATA, decoder .decodable(null, buffer)); }
@Override public MessageDecoderResult decodable(IoSession session, IoBuffer in) { boolean hasHeader = HEADER_PATTERN.find(in, in.position()) != -1L; return hasHeader ? MessageDecoderResult.OK : (in.remaining() > MAX_UNDECODED_DATA_LENGTH ? MessageDecoderResult.NOT_OK : MessageDecoderResult.NEED_DATA); }
FIXMessageDecoder implements MessageDecoder { @Override public MessageDecoderResult decodable(IoSession session, IoBuffer in) { boolean hasHeader = HEADER_PATTERN.find(in, in.position()) != -1L; return hasHeader ? MessageDecoderResult.OK : (in.remaining() > MAX_UNDECODED_DATA_LENGTH ? MessageDecoderResult.NOT_OK : MessageDecoderResult.NEED_DATA); } }
FIXMessageDecoder implements MessageDecoder { @Override public MessageDecoderResult decodable(IoSession session, IoBuffer in) { boolean hasHeader = HEADER_PATTERN.find(in, in.position()) != -1L; return hasHeader ? MessageDecoderResult.OK : (in.remaining() > MAX_UNDECODED_DATA_LENGTH ? MessageDecoderResult.NOT_OK : MessageDecoderResult.NEED_DATA); } FIXMessageDecoder();  FIXMessageDecoder(String charset);  FIXMessageDecoder(String charset, String delimiter); }
FIXMessageDecoder implements MessageDecoder { @Override public MessageDecoderResult decodable(IoSession session, IoBuffer in) { boolean hasHeader = HEADER_PATTERN.find(in, in.position()) != -1L; return hasHeader ? MessageDecoderResult.OK : (in.remaining() > MAX_UNDECODED_DATA_LENGTH ? MessageDecoderResult.NOT_OK : MessageDecoderResult.NEED_DATA); } FIXMessageDecoder();  FIXMessageDecoder(String charset);  FIXMessageDecoder(String charset, String delimiter); @Override MessageDecoderResult decodable(IoSession session, IoBuffer in); @Override MessageDecoderResult decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out); @Override void finishDecode(IoSession session, ProtocolDecoderOutput out); List<String> extractMessages(File file); void extractMessages(File file, final MessageListener listener); }
FIXMessageDecoder implements MessageDecoder { @Override public MessageDecoderResult decodable(IoSession session, IoBuffer in) { boolean hasHeader = HEADER_PATTERN.find(in, in.position()) != -1L; return hasHeader ? MessageDecoderResult.OK : (in.remaining() > MAX_UNDECODED_DATA_LENGTH ? MessageDecoderResult.NOT_OK : MessageDecoderResult.NEED_DATA); } FIXMessageDecoder();  FIXMessageDecoder(String charset);  FIXMessageDecoder(String charset, String delimiter); @Override MessageDecoderResult decodable(IoSession session, IoBuffer in); @Override MessageDecoderResult decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out); @Override void finishDecode(IoSession session, ProtocolDecoderOutput out); List<String> extractMessages(File file); void extractMessages(File file, final MessageListener listener);  }