@Test(expected = FormatException.class) public void testRejectsTooLongBodyForAbort() throws Exception { BdfList body = BdfList.of(ABORT.getValue(), sessionId.getBytes(), previousMsgId.getBytes(), null); validator.validateMessage(message, group, body); }
@Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case REQUEST: return validateRequestMessage(m, body); case ACCEPT: return validateAcceptMessage(m, body); case AUTH: return validateAuthMessage(m, body); case ACTIVATE: return validateActivateMessage(m, body); case DECLINE: case ABORT: return validateOtherMessage(type, m, body); default: throw new FormatException(); } }
IntroductionValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case REQUEST: return validateRequestMessage(m, body); case ACCEPT: return validateAcceptMessage(m, body); case AUTH: return validateAuthMessage(m, body); case ACTIVATE: return validateActivateMessage(m, body); case DECLINE: case ABORT: return validateOtherMessage(type, m, body); default: throw new FormatException(); } } }
IntroductionValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case REQUEST: return validateRequestMessage(m, body); case ACCEPT: return validateAcceptMessage(m, body); case AUTH: return validateAuthMessage(m, body); case ACTIVATE: return validateActivateMessage(m, body); case DECLINE: case ABORT: return validateOtherMessage(type, m, body); default: throw new FormatException(); } } IntroductionValidator(MessageEncoder messageEncoder,
			ClientHelper clientHelper, MetadataEncoder metadataEncoder,
			Clock clock); }
IntroductionValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case REQUEST: return validateRequestMessage(m, body); case ACCEPT: return validateAcceptMessage(m, body); case AUTH: return validateAuthMessage(m, body); case ACTIVATE: return validateActivateMessage(m, body); case DECLINE: case ABORT: return validateOtherMessage(type, m, body); default: throw new FormatException(); } } IntroductionValidator(MessageEncoder messageEncoder,
			ClientHelper clientHelper, MetadataEncoder metadataEncoder,
			Clock clock);  }
IntroductionValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case REQUEST: return validateRequestMessage(m, body); case ACCEPT: return validateAcceptMessage(m, body); case AUTH: return validateAuthMessage(m, body); case ACTIVATE: return validateActivateMessage(m, body); case DECLINE: case ABORT: return validateOtherMessage(type, m, body); default: throw new FormatException(); } } IntroductionValidator(MessageEncoder messageEncoder,
			ClientHelper clientHelper, MetadataEncoder metadataEncoder,
			Clock clock);   }