@Test public void testReadyForQuery() throws Exception { ReadyMessage message = decode(READY_FOR_QUERY); Assert.assertEquals(message.getType(), BackendMessageType.READY_FOR_QUERY); Assert.assertEquals(message.getStatus(), Status.IDLE); }
public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; }
BackendMessageDecoder { public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; } }
BackendMessageDecoder { public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; } BackendMessageDecoder(ConnectionState connectionState); }
BackendMessageDecoder { public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; } BackendMessageDecoder(ConnectionState connectionState); AbstractBackendMessage decode(DecoderInputStream input, boolean block); }
BackendMessageDecoder { public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; } BackendMessageDecoder(ConnectionState connectionState); AbstractBackendMessage decode(DecoderInputStream input, boolean block);  }