All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tangosol.coherence.reporter.QueryExpFilter Maven / Gradle / Ivy

There is a newer version: 24.03
Show newest version
/*
 * Copyright (c) 2000, 2020, Oracle and/or its affiliates.
 *
 * Licensed under the Universal Permissive License v 1.0 as shown at
 * http://oss.oracle.com/licenses/upl.
 */

package com.tangosol.coherence.reporter;


import com.tangosol.util.Filter;

import javax.management.ObjectName;
import javax.management.QueryEval;
import javax.management.QueryExp;

/**
* Wrapper class to map Coherence Filters into JMX QueryExp Interface.
*
* @author ew 2008.02.19
* @since Coherence 3.4
*/
public class QueryExpFilter
    extends QueryEval
    implements QueryExp

    {
    /**
    * Construct a QueryExp Wrapper for the Filter
    *
    * @param filter the Filter to be wrapped.
    */
    public QueryExpFilter(Filter filter)
        {
        m_filter = filter;
        }

    /**
    * @inheritDoc
    */
    public boolean apply(ObjectName objectName)
        {
        return m_filter == null || m_filter.evaluate(objectName);
        }

    /**
    * The wrapped Filter.
    */
    protected Filter m_filter;
    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy