/** * Writes the description of the AlertMessage into the final byte[] */ private void writeDescription(AlertMessage msg) { appendByte(msg.getDescription().getValue()); LOGGER.debug("Description: " + msg.getDescription().getValue()); }
/** * Reads the next bytes as a Description and writes them in the message * * @param msg * Message to write in */ private void parseDescription(AlertMessage msg) { msg.setDescription(parseByteField(AlertByteLength.DESCRIPTION_LENGTH)); LOGGER.debug("Description: " + msg.getDescription().getValue()); } }
@Override public boolean equals(Object obj) { if (!(obj instanceof AlertMessage)) { return false; } if (obj == this) { return true; } AlertMessage alert = (AlertMessage) obj; return (Objects.equals(alert.getLevel().getValue(), this.getLevel().getValue())) && (Objects.equals(alert.getDescription().getValue(), this.getDescription().getValue())); }
private void prepareDescription(AlertMessage msg) { if (msg.getConfig() != null && msg.getConfig().length > 1) { msg.setDescription(msg.getConfig()[1]); } else { msg.setDescription(chooser.getConfig().getDefaultAlertDescription()); } LOGGER.debug("Description: " + msg.getDescription().getValue()); }
AlertMessage am = ((AlertMessage) lm); LOGGER.info(" Last protocol message: Alert ({},{}) [{},{}]", AlertLevel.getAlertLevel(am.getLevel() .getValue()), AlertDescription.getAlertDescription(am.getDescription().getValue()), am.getLevel() .getValue(), am.getDescription().getValue()); } else { LOGGER.info(" Last protocol message: {}", lm.getProtocolMessageType()); && AlertDescription.getAlertDescription(((AlertMessage) lm).getDescription().getValue()) == AlertDescription.RECORD_OVERFLOW) { LOGGER.info(" Vulnerable"); return true;