Tabnine Logo
Notification.setUserData
Code IndexAdd Tabnine to your IDE (free)

How to use
setUserData
method
in
javax.management.Notification

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

origin: quartz-scheduler/quartz

/**
 * sendNotification
 * 
 * @param eventType
 * @param data
 * @param msg
 */
public void sendNotification(String eventType, Object data, String msg) {
  Notification notif = new Notification(eventType, this, sequenceNumber
      .incrementAndGet(), System.currentTimeMillis(), msg);
  if (data != null) {
    notif.setUserData(data);
  }
  emitter.sendNotification(notif);
}
origin: log4j/log4j

public
void addAppenderEvent(Category logger, Appender appender) {
 log.debug("addAppenderEvent called: logger="+logger.getName()+
    ", appender="+appender.getName());
 Notification n = new Notification(ADD_APPENDER+logger.getName(), this, 0);
 n.setUserData(appender);
 log.debug("sending notification.");
 nbs.sendNotification(n);
}
origin: apache/geode

@Override
public void handleNotification(Notification notification, Object handback) {
 NotificationKey key = new NotificationKey(name);
 notification.setUserData(memberSource);
 repo.putEntryInLocalNotificationRegion(key, notification);
}
origin: apache/geode

notif.setUserData(notifBytes);
this.modelMBean.sendNotification(notif);
origin: groovy/groovy-core

/**
 * Called to broadcast message on MBeanServer event bus.  Internally, it calls
 * NotificationBroadCasterSupport.sendNotification() method to dispatch the event.
 *
 * @param data - a data object sent as part of the event parameter.
 * @return a sequence number associated with the emitted event.
 */
public long send(Object data) {
  long seq = NumberSequencer.getNextSequence();
  Notification note = new Notification(
      this.getEvent(),
      this,
      seq,
      System.currentTimeMillis(),
      "Event notification " + this.getEvent()
  );
  note.setUserData(data);
  super.sendNotification(note);
  return seq;
}
origin: apache/geode

/**
 * Implementation handles creation of region by extracting the details from the given event object
 * and sending the {@link SystemMemberJmx#NOTIF_REGION_CREATED} notification to the connected JMX
 * Clients. Region Path is set as User Data in Notification.
 *
 * @param event event object corresponding to the creation of a region
 */
@Override
public void handleRegionCreate(SystemMemberRegionEvent event) {
 Notification notification = new Notification(NOTIF_REGION_CREATED, this.modelMBean,
   Helper.getNextNotificationSequenceNumber(), Helper.getRegionEventDetails(event));
 notification.setUserData(event.getRegionPath());
 Helper.sendNotification(this, notification);
}
origin: apache/geode

/**
 * Implementation handles creation of region by extracting the details from the given event object
 * and sending the {@link SystemMemberJmx#NOTIF_REGION_CREATED} notification to the connected JMX
 * Clients. Region Path is set as User Data in Notification.
 *
 * @param event event object corresponding to the creation of a region
 */
@Override
public void handleRegionCreate(SystemMemberRegionEvent event) {
 Notification notification = new Notification(NOTIF_REGION_CREATED, this.modelMBean,
   Helper.getNextNotificationSequenceNumber(), Helper.getRegionEventDetails(event));
 notification.setUserData(event.getRegionPath());
 Helper.sendNotification(this, notification);
}
origin: apache/geode

/**
 * Sends the alert with the Object source as member. This notification will get filtered out for
 * particular alert level
 *
 */
protected void handleSystemNotification(AlertDetails details) {
 if (!isServiceInitialised("handleSystemNotification")) {
  return;
 }
 if (service.isManager()) {
  String systemSource = "DistributedSystem("
    + service.getDistributedSystemMXBean().getDistributedSystemId() + ")";
  Map<String, String> userData = prepareUserData(details);
  Notification notification = new Notification(JMXNotificationType.SYSTEM_ALERT, systemSource,
    SequenceNumber.next(), details.getMsgTime().getTime(), details.getMsg());
  notification.setUserData(userData);
  service.handleNotification(notification);
 }
}
origin: apache/geode

 /**
  * Implementation should handle loss of region by extracting the details from the given event
  * object and sending the {@link SystemMemberJmx#NOTIF_REGION_LOST} notification to the connected
  * JMX Clients. Region Path is set as User Data in Notification. Additionally, it also clears the
  * ManagedResources created for the region that is lost.
  *
  * @param event event object corresponding to the loss of a region
  */
 @Override
 public void handleRegionLoss(SystemMemberRegionEvent event) {
  SystemMemberCacheJmxImpl cacheResource = this.managedSystemMemberCache;

  if (cacheResource != null) {
   ManagedResource cleanedUp = cacheResource.cleanupRegionResources(event.getRegionPath());

   if (cleanedUp != null) {
    MBeanUtil.unregisterMBean(cleanedUp);
   }
  }

  Notification notification = new Notification(NOTIF_REGION_LOST, this.modelMBean,
    Helper.getNextNotificationSequenceNumber(), Helper.getRegionEventDetails(event));

  notification.setUserData(event.getRegionPath());

  Helper.sendNotification(this, notification);
 }
}
origin: apache/geode

 /**
  * Implementation should handle loss of region by extracting the details from the given event
  * object and sending the {@link SystemMemberJmx#NOTIF_REGION_LOST} notification to the connected
  * JMX Clients. Region Path is set as User Data in Notification. Additionally, it also clears the
  * ManagedResources created for the region that is lost.
  *
  * @param event event object corresponding to the loss of a region
  */
 @Override
 public void handleRegionLoss(SystemMemberRegionEvent event) {
  SystemMemberCacheJmxImpl cacheResource = this.managedSystemMemberCache;

  if (cacheResource != null) {
   ManagedResource cleanedUp = cacheResource.cleanupRegionResources(event.getRegionPath());

   if (cleanedUp != null) {
    MBeanUtil.unregisterMBean(cleanedUp);
   }
  }

  Notification notification = new Notification(NOTIF_REGION_LOST, this.modelMBean,
    Helper.getNextNotificationSequenceNumber(), Helper.getRegionEventDetails(event));

  notification.setUserData(event.getRegionPath());

  Helper.sendNotification(this, notification);
 }
}
origin: spring-projects/spring-integration

public Notification fromMessage(Message<?> message) {
  String type = resolveNotificationType(message);
  Assert.hasText(type, "No notification type header is available, and no default has been provided.");
  Object payload = message.getPayload();
  String notificationMessage = (payload instanceof String) ? (String) payload : null;
  Notification notification = new Notification(type, this.sourceObjectName,
      this.sequence.incrementAndGet(), System.currentTimeMillis(), notificationMessage);
  if (!(payload instanceof String)) {
    notification.setUserData(payload);
  }
  return notification;
}
origin: net.sf.ehcache/ehcache

/**
 * sendNotification
 *
 * @param eventType
 * @param data
 * @param msg
 */
public void sendNotification(String eventType, Object data, String msg) {
  Notification notif = new Notification(eventType, this, sequenceNumber.incrementAndGet(), System.currentTimeMillis(), msg);
  if (data != null) {
    notif.setUserData(data);
  }
  emitter.sendNotification(notif);
}
origin: apache/log4j

public
void addAppenderEvent(Category logger, Appender appender) {
 log.debug("addAppenderEvent called: logger="+logger.getName()+
    ", appender="+appender.getName());
 Notification n = new Notification(ADD_APPENDER+logger.getName(), this, 0);
 n.setUserData(appender);
 log.debug("sending notification.");
 nbs.sendNotification(n);
}
origin: jsevellec/cassandra-unit

  public void onFailure(Throwable t)
  {
    Notification notif = new Notification(StreamEvent.class.getCanonicalName() + ".failure",
                       StreamManagerMBean.OBJECT_NAME,
                       seq.getAndIncrement());
    notif.setUserData(t.fillInStackTrace().toString());
    sendNotification(notif);
  }
}
origin: org.apache.cassandra/cassandra-all

  public void onFailure(Throwable t)
  {
    Notification notif = new Notification(StreamEvent.class.getCanonicalName() + ".failure",
                       StreamManagerMBean.OBJECT_NAME,
                       seq.getAndIncrement());
    notif.setUserData(t.fillInStackTrace().toString());
    sendNotification(notif);
  }
}
origin: jsevellec/cassandra-unit

public void onSuccess(StreamState result)
{
  Notification notif = new Notification(StreamEvent.class.getCanonicalName() + ".success",
                     StreamManagerMBean.OBJECT_NAME,
                     seq.getAndIncrement());
  notif.setUserData(StreamStateCompositeData.toCompositeData(result));
  sendNotification(notif);
}
origin: org.apache.cassandra/cassandra-all

public void onSuccess(StreamState result)
{
  Notification notif = new Notification(StreamEvent.class.getCanonicalName() + ".success",
                     StreamManagerMBean.OBJECT_NAME,
                     seq.getAndIncrement());
  notif.setUserData(StreamStateCompositeData.toCompositeData(result));
  sendNotification(notif);
}
origin: apache/karaf

public void featureEvent(FeatureEvent event) {
  if (!event.isReplay()) {
    Notification notification = new Notification(FEATURE_EVENT_TYPE, objectName, sequenceNumber++);
    notification.setUserData(new JmxFeatureEvent(event).asCompositeData());
    sendNotification(notification);
  }
}
origin: apache/karaf

public void repositoryEvent(RepositoryEvent event) {
  if (!event.isReplay()) {
    Notification notification = new Notification(REPOSITORY_EVENT_TYPE, objectName, sequenceNumber++);
    notification.setUserData(new JmxRepositoryEvent(event).asCompositeData());
    sendNotification(notification);
  }
}
origin: org.apache.log4j/com.springsource.org.apache.log4j

public
void addAppenderEvent(Category logger, Appender appender) {
 log.debug("addAppenderEvent called: logger="+logger.getName()+
    ", appender="+appender.getName());
 Notification n = new Notification(ADD_APPENDER+logger.getName(), this, 0);
 n.setUserData(appender);
 log.debug("sending notification.");
 nbs.sendNotification(n);
}
javax.managementNotificationsetUserData

Popular methods of Notification

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

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now