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

flex.management.jmx.ObjectName Maven / Gradle / Ivy

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package flex.management.jmx;

import java.util.Hashtable;
import javax.management.MalformedObjectNameException;

/**
 * Remotable ObjectName representation that complies with Flash serialization requirements. 
 * This class is JMX 1.1 compliant.
 */
public class ObjectName
{
    /**
     * String representation of the list of key properties sorted in lexical order.
     */
    public String canonicalKeyPropertyListString;
    
    /**
     * Canonical form of the name with properties sorted in lexical order.
     */
    public String canonicalName;
    
    /**
     * The domain part of the object name.
     */
    public String domain;
    
    /**
     * A Hashtable containing key-property pairs.
     */
    public Hashtable keyPropertyList;
    
    /**
     * String representation of the key properties. 
     */
    public String keyPropertyListString;    
    
    /**
     * Indicates whether the object name is a pattern.
     */
    public boolean pattern;
    
    /**
     * Indicates whether the object name is a pattern on key properties.
     */
    public boolean propertyPattern;
    
    /**
     * Constructs an empty ObjectName instance.
     */
    public ObjectName()
    {}
    
    /**
     * Constructs a ObjectName instance based upon a
     * javax.management.ObjectName instance.
     * 
     * @param objectName The JMX ObjectName instance to base this instance on.
     */
    public ObjectName(javax.management.ObjectName objectName)
    {
        canonicalKeyPropertyListString = objectName.getCanonicalKeyPropertyListString();
        canonicalName = objectName.getCanonicalName();
        domain = objectName.getDomain();
        keyPropertyList = objectName.getKeyPropertyList();
        keyPropertyListString = objectName.getKeyPropertyListString();
        pattern = objectName.isPattern();        
        propertyPattern = objectName.isPropertyPattern();
    }
    
    /**
     * Utility method to convert this ObjectName to a
     * javax.management.ObjectName instance.
     * 
     * @return A JMX ObjectName based upon this instance.
     * @throws MalformedObjectNameException an exception
     */
    public javax.management.ObjectName toObjectName() throws MalformedObjectNameException
    {
        return new javax.management.ObjectName(domain, keyPropertyList);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy