nextDecodeAction = read_text_body(frame); return nextDecodeAction.apply();
nextDecodeAction = read_text_body(frame); return nextDecodeAction.apply();
public Object apply() throws IOException { Buffer line = readUntil((byte) '\n', max_command_length, "The maximum command length was exceeded"); if (line != null) { Buffer action = line.moveTail(-1); if (trim) { action = action.trim(); } if (action.length() > 0) { StompFrame frame = new StompFrame(action.ascii()); nextDecodeAction = read_headers(frame); return nextDecodeAction.apply(); } } return null; } };
public Object apply() throws IOException { Buffer sizeBytes = peekBytes(4); if (sizeBytes != null) { int size = sizeBytes.bigEndianEditor().readInt(); if (size < 8) { throw new IOException(String.format("specified frame size %d is smaller than minimum frame size", size)); } if( size > maxFrameSize ) { throw new IOException(String.format("specified frame size %d is larger than maximum frame size", size)); } // TODO: check frame min and max size.. nextDecodeAction = readFrame(size); return nextDecodeAction.apply(); } else { return null; } } };
public Object apply() throws IOException { Buffer line = readUntil((byte) '\n', max_command_length, "The maximum command length was exceeded"); if (line != null) { Buffer action = line.moveTail(-1); if (trim) { action = action.trim(); } if (action.length() > 0) { StompFrame frame = new StompFrame(action.ascii()); nextDecodeAction = read_headers(frame); return nextDecodeAction.apply(); } } return null; } };