Search in sources :

Example 1 with BadBinaryOpValueExpException

use of javax.management.BadBinaryOpValueExpException in project felix by apache.

the class MX4JMBeanServer method filterMBeansByQuery.

/**
 * Filters the given set of ObjectNames following the given QueryExp.
 * Returns a set of ObjectNames that match the given QueryExp.
 */
private Set filterMBeansByQuery(Set scope, QueryExp filter) {
    if (filter == null)
        return scope;
    Set set = new HashSet();
    for (Iterator i = scope.iterator(); i.hasNext(); ) {
        ObjectName name = (ObjectName) i.next();
        filter.setMBeanServer(this);
        try {
            if (filter.apply(name))
                set.add(name);
        } catch (BadStringOperationException ignored) {
        } catch (BadBinaryOpValueExpException ignored) {
        } catch (BadAttributeValueExpException x) {
        } catch (InvalidApplicationException x) {
        } catch (SecurityException x) {
        } catch (Exception x) {
        // The 1.2 spec says Exceptions must not be propagated
        }
    }
    return set;
}
Also used : BadStringOperationException(javax.management.BadStringOperationException) Set(java.util.Set) HashSet(java.util.HashSet) Iterator(java.util.Iterator) InvalidApplicationException(javax.management.InvalidApplicationException) BadAttributeValueExpException(javax.management.BadAttributeValueExpException) IntrospectionException(javax.management.IntrospectionException) OperationsException(javax.management.OperationsException) BadBinaryOpValueExpException(javax.management.BadBinaryOpValueExpException) InstanceAlreadyExistsException(javax.management.InstanceAlreadyExistsException) BadStringOperationException(javax.management.BadStringOperationException) ReflectionException(javax.management.ReflectionException) NotCompliantMBeanException(javax.management.NotCompliantMBeanException) RuntimeErrorException(javax.management.RuntimeErrorException) MalformedObjectNameException(javax.management.MalformedObjectNameException) ListenerNotFoundException(javax.management.ListenerNotFoundException) RuntimeOperationsException(javax.management.RuntimeOperationsException) AttributeNotFoundException(javax.management.AttributeNotFoundException) MBeanRegistrationException(javax.management.MBeanRegistrationException) InstanceNotFoundException(javax.management.InstanceNotFoundException) JMRuntimeException(javax.management.JMRuntimeException) PrivilegedActionException(java.security.PrivilegedActionException) BadAttributeValueExpException(javax.management.BadAttributeValueExpException) IOException(java.io.IOException) ImplementationException(org.apache.felix.mosgi.jmx.agent.mx4j.ImplementationException) InvalidAttributeValueException(javax.management.InvalidAttributeValueException) MBeanException(javax.management.MBeanException) InvalidApplicationException(javax.management.InvalidApplicationException) HashSet(java.util.HashSet) ObjectName(javax.management.ObjectName) BadBinaryOpValueExpException(javax.management.BadBinaryOpValueExpException)

Aggregations

IOException (java.io.IOException)1 PrivilegedActionException (java.security.PrivilegedActionException)1 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 Set (java.util.Set)1 AttributeNotFoundException (javax.management.AttributeNotFoundException)1 BadAttributeValueExpException (javax.management.BadAttributeValueExpException)1 BadBinaryOpValueExpException (javax.management.BadBinaryOpValueExpException)1 BadStringOperationException (javax.management.BadStringOperationException)1 InstanceAlreadyExistsException (javax.management.InstanceAlreadyExistsException)1 InstanceNotFoundException (javax.management.InstanceNotFoundException)1 IntrospectionException (javax.management.IntrospectionException)1 InvalidApplicationException (javax.management.InvalidApplicationException)1 InvalidAttributeValueException (javax.management.InvalidAttributeValueException)1 JMRuntimeException (javax.management.JMRuntimeException)1 ListenerNotFoundException (javax.management.ListenerNotFoundException)1 MBeanException (javax.management.MBeanException)1 MBeanRegistrationException (javax.management.MBeanRegistrationException)1 MalformedObjectNameException (javax.management.MalformedObjectNameException)1 NotCompliantMBeanException (javax.management.NotCompliantMBeanException)1