@Override
public MBeanNotificationInfo[] getNotificationInfo() {
String[] types = new String[] {JMX_MONITOR_RATE_LIMIT_SERVICE_TYPE,
MonitorNotification.THRESHOLD_VALUE_EXCEEDED};
MBeanNotificationInfo info = new MBeanNotificationInfo(types, Notification.class.getName(),
"rate-limited request processed");
return new MBeanNotificationInfo[] {info};
}
java类javax.management.MBeanNotificationInfo的实例源码
ManagedRateLimiter.java 文件源码
项目:azeroth
阅读 17
收藏 0
点赞 0
评论 0
ConnectionPool.java 文件源码
项目:apache-tomcat-7.0.73-with-comment
阅读 33
收藏 0
点赞 0
评论 0
@Override
public MBeanNotificationInfo[] getNotificationInfo() {
MBeanNotificationInfo[] pres = super.getNotificationInfo();
MBeanNotificationInfo[] loc = getDefaultNotificationInfo();
MBeanNotificationInfo[] aug = new MBeanNotificationInfo[pres.length + loc.length];
if (pres.length>0) System.arraycopy(pres, 0, aug, 0, pres.length);
if (loc.length >0) System.arraycopy(loc, 0, aug, pres.length, loc.length);
return aug;
}
ConnectionPool.java 文件源码
项目:apache-tomcat-7.0.73-with-comment
阅读 26
收藏 0
点赞 0
评论 0
public static MBeanNotificationInfo[] getDefaultNotificationInfo() {
String[] types = new String[] {NOTIFY_INIT, NOTIFY_CONNECT, NOTIFY_ABANDON, SLOW_QUERY_NOTIFICATION,
FAILED_QUERY_NOTIFICATION, SUSPECT_ABANDONED_NOTIFICATION, POOL_EMPTY, SUSPECT_RETURNED_NOTIFICATION};
String name = Notification.class.getName();
String description = "A connection pool error condition was met.";
MBeanNotificationInfo info = new MBeanNotificationInfo(types, name, description);
return new MBeanNotificationInfo[] {info};
}
DirectoryScanner.java 文件源码
项目:jdk8u-jdk
阅读 26
收藏 0
点赞 0
评论 0
/**
* The {@link DirectoryScannerMXBean} may send two types of
* notifications: filematch, and state attribute changed.
**/
public MBeanNotificationInfo[] getNotificationInfo() {
return new MBeanNotificationInfo[] {
new MBeanNotificationInfo(
new String[] {FILE_MATCHES_NOTIFICATION},
Notification.class.getName(),
"Emitted when a file that matches the scan criteria is found"
),
new MBeanNotificationInfo(
new String[] {AttributeChangeNotification.ATTRIBUTE_CHANGE},
AttributeChangeNotification.class.getName(),
"Emitted when the State attribute changes"
)
};
}
ScanManager.java 文件源码
项目:jdk8u-jdk
阅读 28
收藏 0
点赞 0
评论 0
/**
* We emit an {@code AttributeChangeNotification} when the {@code State}
* attribute changes.
**/
public MBeanNotificationInfo[] getNotificationInfo() {
return new MBeanNotificationInfo[] {
new MBeanNotificationInfo(new String[] {
AttributeChangeNotification.ATTRIBUTE_CHANGE},
AttributeChangeNotification.class.getName(),
"Emitted when the State attribute changes")
};
}
GarbageCollectorImpl.java 文件源码
项目:jdk8u-jdk
阅读 28
收藏 0
点赞 0
评论 0
@Override
public MBeanNotificationInfo[] getNotificationInfo() {
return new MBeanNotificationInfo[]{
new MBeanNotificationInfo(gcNotifTypes,
notifName,
"GC Notification")
};
}
MemoryManagerImpl.java 文件源码
项目:jdk8u-jdk
阅读 25
收藏 0
点赞 0
评论 0
public MBeanNotificationInfo[] getNotificationInfo() {
synchronized (this) {
if(notifInfo == null) {
notifInfo = new MBeanNotificationInfo[0];
}
}
return notifInfo;
}
SnmpMibTable.java 文件源码
项目:jdk8u-jdk
阅读 28
收藏 0
点赞 0
评论 0
/**
* Return a <CODE>NotificationInfo</CODE> object containing the
* notification class and the notification type sent by the
* <CODE>SnmpMibTable</CODE>.
*/
@Override
public MBeanNotificationInfo[] getNotificationInfo() {
String[] types = {SnmpTableEntryNotification.SNMP_ENTRY_ADDED,
SnmpTableEntryNotification.SNMP_ENTRY_REMOVED};
MBeanNotificationInfo[] notifsInfo = {
new MBeanNotificationInfo
(types, "com.sun.jmx.snmp.agent.SnmpTableEntryNotification",
"Notifications sent by the SnmpMibTable")
};
return notifsInfo;
}
NotSerializableNotifTest.java 文件源码
项目:openjdk-jdk10
阅读 17
收藏 0
点赞 0
评论 0
public MBeanNotificationInfo[] getNotificationInfo() {
final String[] ntfTypes = {myType};
final MBeanNotificationInfo[] ntfInfoArray = {
new MBeanNotificationInfo(ntfTypes,
"javax.management.Notification",
"Notifications sent by the NotificationEmitter")};
return ntfInfoArray;
}
ModelMBeanInfoSupport.java 文件源码
项目:jdk8u-jdk
阅读 26
收藏 0
点赞 0
评论 0
/**
* Deserializes a {@link ModelMBeanInfoSupport} from an {@link ObjectInputStream}.
*/
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
if (compat) {
// Read an object serialized in the old serial form
//
ObjectInputStream.GetField fields = in.readFields();
modelMBeanDescriptor =
(Descriptor) fields.get("modelMBeanDescriptor", null);
if (fields.defaulted("modelMBeanDescriptor")) {
throw new NullPointerException("modelMBeanDescriptor");
}
modelMBeanAttributes =
(MBeanAttributeInfo[]) fields.get("mmbAttributes", null);
if (fields.defaulted("mmbAttributes")) {
throw new NullPointerException("mmbAttributes");
}
modelMBeanConstructors =
(MBeanConstructorInfo[]) fields.get("mmbConstructors", null);
if (fields.defaulted("mmbConstructors")) {
throw new NullPointerException("mmbConstructors");
}
modelMBeanNotifications =
(MBeanNotificationInfo[]) fields.get("mmbNotifications", null);
if (fields.defaulted("mmbNotifications")) {
throw new NullPointerException("mmbNotifications");
}
modelMBeanOperations =
(MBeanOperationInfo[]) fields.get("mmbOperations", null);
if (fields.defaulted("mmbOperations")) {
throw new NullPointerException("mmbOperations");
}
} else {
// Read an object serialized in the new serial form
//
in.defaultReadObject();
}
}