Codota Logo
Notification.getSequenceNumber
Code IndexAdd Codota to your IDE (free)

How to use
getSequenceNumber
method
in
javax.management.Notification

Best Java code snippets using javax.management.Notification.getSequenceNumber (Showing top 20 results out of 315)

  • Common ways to obtain Notification
private void myMethod () {
Notification n =
  • Codota IconStandardWrapper this;new Notification("j2ee.state.starting", this.getObjectName(), sequenceNumber++)
  • Codota IconStandardContext this;AtomicLong sequenceNumber;new Notification("j2ee.state.running", this.getObjectName(), sequenceNumber.getAndIncrement())
  • Codota IconString str;BaseModelMBean baseModelMBean;String str2;new Notification(str, baseModelMBean, long1, str2)
  • Smart code suggestions by Codota
}
origin: groovy/groovy-core

  private static Map buildOperationNotificationPacket(Notification note) {
    Map<String, Object> result = new HashMap<String, Object>();
    result.put("event", note.getType());
    result.put("source", note.getSource());
    result.put("sequenceNumber", note.getSequenceNumber());
    result.put("timeStamp", note.getTimeStamp());
    result.put("data", note.getUserData());
    return result;
  }
}
origin: org.kohsuke.droovy/groovy

  private static Map buildOperationNotificationPacket(Notification note) {
    Map<String, Object> result = new HashMap<String, Object>();
    result.put("event", note.getType());
    result.put("source", note.getSource());
    result.put("sequenceNumber", note.getSequenceNumber());
    result.put("timeStamp", note.getTimeStamp());
    result.put("data", note.getUserData());
    return result;
  }
}
origin: org.codehaus.groovy/groovy-jmx

  private static Map buildOperationNotificationPacket(Notification note) {
    Map<String, Object> result = new HashMap<String, Object>();
    result.put("event", note.getType());
    result.put("source", note.getSource());
    result.put("sequenceNumber", note.getSequenceNumber());
    result.put("timeStamp", note.getTimeStamp());
    result.put("data", note.getUserData());
    return result;
  }
}
origin: org.codehaus.groovy/groovy-jdk14

  private static Map buildOperationNotificationPacket(Notification note) {
    Map<String, Object> result = new HashMap<String, Object>();
    result.put("event", note.getType());
    result.put("source", note.getSource());
    result.put("sequenceNumber", note.getSequenceNumber());
    result.put("timeStamp", note.getTimeStamp());
    result.put("data", note.getUserData());
    return result;
  }
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

  private static Map buildOperationNotificationPacket(Notification note) {
    Map<String, Object> result = new HashMap<String, Object>();
    result.put("event", note.getType());
    result.put("source", note.getSource());
    result.put("sequenceNumber", note.getSequenceNumber());
    result.put("timeStamp", note.getTimeStamp());
    result.put("data", note.getUserData());
    return result;
  }
}
origin: io.snappydata/gemfire-hydra-tests

private void printJMXNotification(Notification notification, Object handback) {
 StringBuilder sb = new StringBuilder();
 sb.append("JMXNotificationListener(" + prefix + ") : Notification [ type=").append(notification.getType()).append(", message=")
   .append(notification.getMessage())
   .append(", source=").append(notification.getSource())
   .append(", seqNo=").append(notification.getSequenceNumber())
   .append(", timestamp=").append(notification.getTimeStamp())
   .append(", data=").append(ObjectToString(notification.getUserData()))
   .append(", handbackObject=").append(ObjectToString(handback)).append(" ]");
 logInfo(sb.toString());
}
origin: org.wso2.es/org.wso2.es.integration.common.utils

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);
  }
  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("***************************************************");
}
origin: com.technophobia.substeps/substeps-maven-plugin

public void handleNotification(Notification notification, Object handback) {
  if (notification.getType().compareTo("ExNode")==0) {
    byte[] rawBytes = (byte[])notification.getUserData();
    ExecutionNodeResult result = getFromBytes(rawBytes);
    this.log.debug("received a JMX event msg: " + notification.getMessage() + " seq: " + notification.getSequenceNumber() + " exec result node id: " + result.getExecutionNodeId());
//        notificiationHandler.handleNotification(result);
  }
  else if (notification.getType().compareTo("ExecConfigComplete")==0) {
//        notificiationHandler.handleCompleteMessage();
  }
  else {
    log.error("unknown notificaion type");
  }
}
origin: org.mobicents.tools.snmp.adaptor/core

@Override
public void sendJMXNotification(Notification notification) {
  if(notification.getSequenceNumber() <= 0) {
    notification.setSequenceNumber(getNextNotificationSequenceNumber());
  }
  try {
    this.trapEmitter.send(notification);           
  } catch (Exception e) {
     log.error("Problem occured while Sending trap", e);
  }           
}

origin: org.jboss.jbossas/jboss-snmp

@Override
public void sendJMXNotification(Notification notification) {
  if(notification.getSequenceNumber() <= 0) {
    notification.setSequenceNumber(getNextNotificationSequenceNumber());
  }
  try {
    this.trapEmitter.send(notification);           
  } catch (Exception e) {
     log.error("Problem occured while Sending trap", e);
  }           
}

origin: org.mobicents.tools.snmp.adaptor/core

/**
* All notifications are intercepted here and are routed for emission.
*/
public void handleNotification2(Notification n, Object handback)
{
 if (log.isDebugEnabled()) {
   log.debug("Received notification: <" + n + "> Payload " +
        "TS: <" + n.getTimeStamp() + "> " +
        "SN: <" + n.getSequenceNumber() + "> " +
        "T:  <" + n.getType() + ">");
 }
 
 try {
   this.trapEmitter.send(n);           
 }
 catch (Exception e) {
   log.error("Sending trap", e);
 }    
}
origin: org.jboss.jbossas/jboss-snmp

/**
* All notifications are intercepted here and are routed for emission.
*/
public void handleNotification2(Notification n, Object handback)
{
 if (log.isDebugEnabled()) {
   log.debug("Received notification: <" + n + "> Payload " +
        "TS: <" + n.getTimeStamp() + "> " +
        "SN: <" + n.getSequenceNumber() + "> " +
        "T:  <" + n.getType() + ">");
 }
 
 try {
   this.trapEmitter.send(n);           
 }
 catch (Exception e) {
   log.error("Sending trap", e);
 }    
}
origin: org.terracotta/terracotta-l1-ee

public void broadcastLogEvent(final String event, final String[] throwableStringRep) {
 Notification notif = new Notification(LOGGING_EVENT_TYPE, this, sequenceNumber.incrementAndGet(),
                       System.currentTimeMillis(), event);
 notif.setUserData(throwableStringRep);
 sendNotification(notif);
 notif = new Notification(notif.getType(), getClass().getName(), notif.getSequenceNumber(), notif.getTimeStamp(),
              notif.getMessage());
 notif.setUserData(throwableStringRep);
 tcLoggingHistoryProvider.push(notif);
}
origin: org.terracotta/terracotta-l1

public void broadcastLogEvent(final String event, final String[] throwableStringRep) {
 Notification notif = new Notification(LOGGING_EVENT_TYPE, this, sequenceNumber.incrementAndGet(),
                       System.currentTimeMillis(), event);
 notif.setUserData(throwableStringRep);
 sendNotification(notif);
 notif = new Notification(notif.getType(), getClass().getName(), notif.getSequenceNumber(), notif.getTimeStamp(),
              notif.getMessage());
 notif.setUserData(throwableStringRep);
 tcLoggingHistoryProvider.push(notif);
}
origin: org.terracotta/terracotta-ee

public void broadcastLogEvent(final String event, final String[] throwableStringRep) {
 Notification notif = new Notification(LOGGING_EVENT_TYPE, this, sequenceNumber.incrementAndGet(),
                       System.currentTimeMillis(), event);
 notif.setUserData(throwableStringRep);
 sendNotification(notif);
 notif = new Notification(notif.getType(), getClass().getName(), notif.getSequenceNumber(), notif.getTimeStamp(),
              notif.getMessage());
 notif.setUserData(throwableStringRep);
 tcLoggingHistoryProvider.push(notif);
}
origin: mx4j/mx4j-tools

protected void onSerialize(SerializationContext context, Notification notification) throws IOException
{
 context.serialize(CLASS_NAME_QNAME, null, notification.getType());
 context.serialize(SOURCE_QNAME, null, notification.getSource());
 context.serialize(SEQUENCE_NUMBER_QNAME, null, new Long(notification.getSequenceNumber()));
 context.serialize(TIMESTAMP_QNAME, null, new Long(notification.getTimeStamp()));
 context.serialize(MESSAGE_QNAME, null, notification.getMessage());
 context.serialize(USER_DATA_QNAME, null, notification.getUserData());
}
origin: org.apache.brooklyn/brooklyn-software-base

  private void assertNotificationsEqual(Notification n1, Notification n2) {
    assertEquals(n1.getType(), n2.getType());
    assertEquals(n1.getSequenceNumber(), n2.getSequenceNumber());
    assertEquals(n1.getUserData(), n2.getUserData());
    assertEquals(n1.getTimeStamp(), n2.getTimeStamp());
    assertEquals(n1.getMessage(), n2.getMessage());
  }
}
origin: com.github.hqstevenson.splunk/splunk.jmx

@Override
protected void addAdditionalFieldsToMap(EventCollectorClient client, Map<String, Object> map) {
  super.addAdditionalFieldsToMap(client, map);
  if (includeNotificationType) {
    map.put(NOTIFICATION_TYPE_KEY, getEventBody().getType());
  }
  if (includeNotificationMessage) {
    addField(NOTIFICATION_MESSAGE_KEY, getEventBody().getMessage());
  }
  if (includeNotificationSequenceNumber) {
    addField(NOTIFICATION_SEQUENCE_NUMBER_KEY, Long.toString(getEventBody().getSequenceNumber()));
  }
  if (includeNotificationSource) {
    addField(NOTIFICATION_SOURCE_KEY, getEventBody().getSource().toString());
  }
}
origin: org.jppf/jppf-server

 @Override
 public synchronized void notificationReceived(final ForwardingNotificationEvent event) {
  final Notification notif = event.getNotification();
  if (debugEnabled) log.debug("received notification from node={}, mbean={}, notification={} (sequence={}, timestamp={})",
   event.getNodeUuid(), event.getMBeanName(), notif, notif.getSequenceNumber(), notif.getTimeStamp());
  forwarder.sendNotification(new JPPFNodeForwardingNotification(notif, event.getNodeUuid(), event.getMBeanName()));
 }
}
origin: io.snamp/json-helpers

  @Override
  public void serialize(final Notification src, final JsonGenerator jgen, final SerializerProvider provider) throws IOException {
    final ObjectNode node = ThreadLocalJsonFactory.getFactory().objectNode();
    node.put(SOURCE, ThreadLocalJsonFactory.getFactory().textNode(src.getSource().toString()));
    node.put(NOTIF_TYPE, src.getType());
    node.put(SEQUENCE_NUMBER, src.getSequenceNumber());
    if (timeStampAsString)
      node.put(TIME_STAMP, ThreadLocalJsonFactory.toValueNode(new Date(src.getTimeStamp())));
    else
      node.put(TIME_STAMP, src.getTimeStamp());
    node.put(MESSAGE, src.getMessage());
    node.put(USER_DATA, ThreadLocalJsonFactory.toValueNode(src.getUserData()));
    node.serialize(jgen, provider);
  }
}
javax.managementNotificationgetSequenceNumber

Popular methods of Notification

  • getType
  • <init>
  • getUserData
  • setUserData
  • getMessage
  • getSource
  • getTimeStamp
  • setSource
  • toString
  • setSequenceNumber
  • getAttachments
  • getClass
  • getAttachments,
  • getClass,
  • getFlag,
  • getIntent,
  • getTitle,
  • setCreatedd_time,
  • setId,
  • setLatestEventInfo,
  • setLink

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now