ApplicationMessageHandler extends ProtocolMessageHandler<ApplicationMessage> { @Override public void adjustTLSContext(ApplicationMessage message) { tlsContext.setLastHandledApplicationMessageData(message.getData().getValue()); String readableAppData = ArrayConverter.bytesToHexString(tlsContext.getLastHandledApplicationMessageData()); if (tlsContext.getTalkingConnectionEndType() == tlsContext.getChooser().getMyConnectionPeer()) { LOGGER.debug("Received Data:" + readableAppData); } else { LOGGER.debug("Send Data:" + readableAppData); } } ApplicationMessageHandler(TlsContext tlsContext); @Override ApplicationMessageParser getParser(byte[] message, int pointer); @Override ApplicationMessagePreparator getPreparator(ApplicationMessage message); @Override ApplicationMessageSerializer getSerializer(ApplicationMessage message); @Override void adjustTLSContext(ApplicationMessage message);  }
@Test public void testAdjustTLSContext() { ApplicationMessage message = new ApplicationMessage(); message.setData(new byte[] { 0, 1, 2, 3, 4, 5, 6 }); handler.adjustTLSContext(message); }