@Test public void testCreateErrorMsg () { Buffer content = MessageUtils.createErrorMsg(Protocol.MSG_EXTENDED_TYPE_INTERNAL_SERVER_ERROR, 200); assertEquals(Protocol.MSG_TYPE_ERROR, content.getByte(0)); assertEquals(Protocol.MSG_EXTENDED_TYPE_INTERNAL_SERVER_ERROR, content.getByte(1)); assertEquals(Protocol.MSG_PROTOCOL_VERSION, content.getShort(2)); assertEquals(200, content.getInt(4)); }
public static Buffer createErrorMsg (byte extendedType, int cid) { Buffer content = Buffer.buffer(); content.setByte(0, Protocol.MSG_TYPE_ERROR); content.setByte(1, extendedType); content.setShort(2, Protocol.MSG_PROTOCOL_VERSION); content.setInt(4, cid); return content; }
MessageUtils { public static Buffer createErrorMsg (byte extendedType, int cid) { Buffer content = Buffer.buffer(); content.setByte(0, Protocol.MSG_TYPE_ERROR); content.setByte(1, extendedType); content.setShort(2, Protocol.MSG_PROTOCOL_VERSION); content.setInt(4, cid); return content; } }
MessageUtils { public static Buffer createErrorMsg (byte extendedType, int cid) { Buffer content = Buffer.buffer(); content.setByte(0, Protocol.MSG_TYPE_ERROR); content.setByte(1, extendedType); content.setShort(2, Protocol.MSG_PROTOCOL_VERSION); content.setInt(4, cid); return content; } protected  MessageUtils(); }
MessageUtils { public static Buffer createErrorMsg (byte extendedType, int cid) { Buffer content = Buffer.buffer(); content.setByte(0, Protocol.MSG_TYPE_ERROR); content.setByte(1, extendedType); content.setShort(2, Protocol.MSG_PROTOCOL_VERSION); content.setInt(4, cid); return content; } protected  MessageUtils(); static Buffer createMsg(byte type, byte extendedType, int cid); static Buffer createErrorMsg(byte extendedType, int cid); }
MessageUtils { public static Buffer createErrorMsg (byte extendedType, int cid) { Buffer content = Buffer.buffer(); content.setByte(0, Protocol.MSG_TYPE_ERROR); content.setByte(1, extendedType); content.setShort(2, Protocol.MSG_PROTOCOL_VERSION); content.setInt(4, cid); return content; } protected  MessageUtils(); static Buffer createMsg(byte type, byte extendedType, int cid); static Buffer createErrorMsg(byte extendedType, int cid);  }