/**
* Helper method to query {@link ObjectName}s from an {@link MBeanServer}
* based on {@link Predicate}
*
* @param server
* @param predicate
* @return
*/
public static Set<ObjectName> queryNames(MBeanServer server, final Predicate<ObjectName> predicate) {
@SuppressWarnings("serial")
Set<ObjectName> registered = server.queryNames(null, new QueryExp() {
@Override
public void setMBeanServer(MBeanServer s) {
}
@Override
public boolean apply(ObjectName name) throws BadStringOperationException, BadBinaryOpValueExpException,
BadAttributeValueExpException, InvalidApplicationException {
return predicate.test(name);
}
});
return registered;
}
java类javax.management.InvalidApplicationException的实例源码
APIMBean.java 文件源码
项目:scylla-jmx
阅读 28
收藏 0
点赞 0
评论 0
AComModule.java 文件源码
项目:GPSSimulator
阅读 20
收藏 0
点赞 0
评论 0
/**
* Sends a message
* @param msg Message that shall be send
* @throws InvalidApplicationException If the passed argument is null
* @throws IOException In case of an error during writing the output stream
*/
public abstract void send(@NotNull String msg) throws InvalidApplicationException;