List of usage examples for javax.management Notification getSequenceNumber
public long getSequenceNumber()
From source file:de.iew.spring.integration.JmxTestServiceNotificationListener.java
private String formatNotification(Notification notification) { StringBuilder sb = new StringBuilder(); sb.append("recieved notification class: ").append(notification.getType()); sb.append(", method: ").append(notification.getSource()); sb.append(", sequence: ").append(notification.getSequenceNumber()); sb.append(", timestamp: ").append(notification.getTimeStamp()); sb.append(", data: "); Object userData = notification.getUserData(); String formattedUserData;//from ww w . j ava 2 s . com if (userData == null) { formattedUserData = ""; } else if (userData instanceof String) { formattedUserData = StringUtils.arrayToCommaDelimitedString((Object[]) notification.getUserData()); } else { formattedUserData = userData.toString(); } sb.append(formattedUserData); return sb.toString(); }
From source file:org.wso2.carbon.registry.subscription.test.util.JMXClient.java
public void handleNotification(Notification ntfyObj, Object handback) { log.info("***************************************************"); log.info("* Notification received at " + new Date().toString()); log.info("* type = " + ntfyObj.getType()); log.info("* message = " + ntfyObj.getMessage()); if (ntfyObj.getMessage().contains(path)) { setSuccess(true);// ww w .j a v a 2 s . c om } log.info("* seqNum = " + ntfyObj.getSequenceNumber()); log.info("* source = " + ntfyObj.getSource()); log.info("* seqNum = " + Long.toString(ntfyObj.getSequenceNumber())); log.info("* timeStamp = " + new Date(ntfyObj.getTimeStamp())); log.info("* userData = " + ntfyObj.getUserData()); log.info("***************************************************"); }