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

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JLabel (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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