本文整理了Java中javax.management.AttributeChangeNotification.getType()
方法的一些代码示例,展示了AttributeChangeNotification.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeChangeNotification.getType()
方法的具体详情如下:
包路径:javax.management.AttributeChangeNotification
类名称:AttributeChangeNotification
方法名:getType
暂无
代码示例来源:origin: apache/geode
@Override
public void sendAttributeChangeNotification(AttributeChangeNotification notification)
throws MBeanException, RuntimeOperationsException {
if (notification == null)
throw new RuntimeOperationsException(new IllegalArgumentException(
"Notification cannot be null."));
getAttributeChangeBroadcaster().sendNotification(notification);
Logger modelMBeanLogger = getModelMBeanLogger(notification.getType());
if (modelMBeanLogger != null)
if (modelMBeanLogger.isEnabledFor(Logger.DEBUG))
modelMBeanLogger.debug("ModelMBean log: " + new Date() + " - " + notification);
Logger logger = getLogger();
if (logger.isEnabledFor(Logger.DEBUG))
logger.debug("Attribute change notification " + notification + " sent");
}
代码示例来源:origin: jboss.web/jbossweb
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return (false);
if (!(notification instanceof AttributeChangeNotification))
return (false);
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return (false);
synchronized (names) {
if (names.size() < 1)
return (true);
else
return (names.contains(acn.getAttributeName()));
}
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return (false);
if (!(notification instanceof AttributeChangeNotification))
return (false);
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return (false);
synchronized (names) {
if (names.size() < 1)
return (true);
else
return (names.contains(acn.getAttributeName()));
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return (false);
if (!(notification instanceof AttributeChangeNotification))
return (false);
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return (false);
synchronized (names) {
if (names.size() < 1)
return (true);
else
return (names.contains(acn.getAttributeName()));
}
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
@Override
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return (false);
if (!(notification instanceof AttributeChangeNotification))
return (false);
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return (false);
synchronized (names) {
if (names.size() < 1)
return (true);
else
return (names.contains(acn.getAttributeName()));
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/util
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
@Override
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return (false);
if (!(notification instanceof AttributeChangeNotification))
return (false);
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return (false);
synchronized (names) {
if (names.size() < 1)
return (true);
else
return (names.contains(acn.getAttributeName()));
}
}
代码示例来源:origin: commons-modeler/commons-modeler
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return (false);
if (!(notification instanceof AttributeChangeNotification))
return (false);
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return (false);
synchronized (names) {
if (names.size() < 1)
return (true);
else
return (names.contains(acn.getAttributeName()));
}
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return (false);
if (!(notification instanceof AttributeChangeNotification))
return (false);
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return (false);
synchronized (names) {
if (names.size() < 1)
return (true);
else
return (names.contains(acn.getAttributeName()));
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
@Override
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return false;
if (!(notification instanceof AttributeChangeNotification))
return false;
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return false;
synchronized (names) {
if (names.size() < 1)
return true;
else
return names.contains(acn.getAttributeName());
}
}
代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote
/**
* <p>Test whether notification enabled for this event.
* Return true if:</p>
* <ul>
* <li>This is an attribute change notification</li>
* <li>Either the set of accepted names is empty (implying that all
* attribute names are of interest) or the set of accepted names
* includes the name of the attribute in this notification</li>
* </ul>
*/
@Override
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
return (false);
if (!(notification instanceof AttributeChangeNotification))
return (false);
AttributeChangeNotification acn =
(AttributeChangeNotification) notification;
if (!AttributeChangeNotification.ATTRIBUTE_CHANGE.equals(acn.getType()))
return (false);
synchronized (names) {
if (names.size() < 1)
return (true);
else
return (names.contains(acn.getAttributeName()));
}
}
代码示例来源:origin: wildfly/wildfly-core
private void writeNotification(AttributeChangeNotification notification, Path path) {
try (BufferedWriter in = Files.newBufferedWriter(path, StandardCharsets.UTF_8, StandardOpenOption.APPEND)) {
in.write(String.format("%s %s %s %s", notification.getType(), notification.getSequenceNumber(), notification.getSource().toString(), notification.getMessage()));
in.newLine();
in.flush();
try (BufferedWriter in = Files
.newBufferedWriter(path, StandardCharsets.UTF_8, StandardOpenOption.APPEND)) {
in.write(String.format("%s %s %s %s", notification.getType(),
notification.getSequenceNumber(), notification.getSource().toString(),
notification.getMessage()));
代码示例来源:origin: org.apache.geode/gemfire-core
public void sendAttributeChangeNotification(AttributeChangeNotification notification) throws MBeanException, RuntimeOperationsException
{
if (notification == null) throw new RuntimeOperationsException(new IllegalArgumentException(LocalizedStrings.MX4JModelMBean_NOTIFICATION_CANNOT_BE_NULL.toLocalizedString()));
getAttributeChangeBroadcaster().sendNotification(notification);
Logger modelMBeanLogger = getModelMBeanLogger(notification.getType());
if (modelMBeanLogger != null) if (modelMBeanLogger.isEnabledFor(Logger.DEBUG)) modelMBeanLogger.debug("ModelMBean log: " + new Date() + " - " + notification);
Logger logger = getLogger();
if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Attribute change notification " + notification + " sent");
}
代码示例来源:origin: io.snappydata/gemfire-core
public void sendAttributeChangeNotification(AttributeChangeNotification notification) throws MBeanException, RuntimeOperationsException
{
if (notification == null) throw new RuntimeOperationsException(new IllegalArgumentException(LocalizedStrings.MX4JModelMBean_NOTIFICATION_CANNOT_BE_NULL.toLocalizedString()));
getAttributeChangeBroadcaster().sendNotification(notification);
Logger modelMBeanLogger = getModelMBeanLogger(notification.getType());
if (modelMBeanLogger != null) if (modelMBeanLogger.isEnabledFor(Logger.DEBUG)) modelMBeanLogger.debug("ModelMBean log: " + new Date() + " - " + notification);
Logger logger = getLogger();
if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Attribute change notification " + notification + " sent");
}
内容来源于网络,如有侵权,请联系作者删除!