Package org.apache.qpid.qmf2.common

Examples of org.apache.qpid.qmf2.common.SchemaClass


        else if (target == QmfQueryTarget.SCHEMA)
        {
            List<Map> results = new ArrayList<Map>(1);
            // Look up a SchemaClass object by the SchemaClassId obtained from the query
            SchemaClassId classId = query.getSchemaClassId();
            SchemaClass schema = _schemaCache.get(classId);
            if (schema != null)
            {
                results.add(schema.mapEncode());
            }
            queryResponse(handle, results, "_schema"); // Send the response back to the Console.
        }
        else if (target == QmfQueryTarget.OBJECT_ID)
        {
View Full Code Here


        // where tools such as qpid-config might have made assumptions about its ObjectId rather than doing "discovery".
        ObjectId addr = object.getObjectId();
        if (addr == null)
        {
            SchemaClassId classId = object.getSchemaClassId();
            SchemaClass schema = _schemaCache.get(classId);

            // Try to create an objectName using the property names that have been specified as idNames in the schema
            StringBuilder buf = new StringBuilder();
            // Initialise idNames as an empty array as we want to check if a key has been used to construct the name.
            String[] idNames = {};
View Full Code Here

     * <p>
     * I <i>believe</i> that there should only be one entry in the list returned when looking up a specific chema by classId.
     */
    public List<SchemaClass> getSchema(final SchemaClassId classId)
    {
        SchemaClass schema = _schemaCache.get(classId);
        if (schema == SchemaClass.EMPTY_SCHEMA)
        {
            return Collections.emptyList();
        }
       
View Full Code Here

        else if (target == QmfQueryTarget.SCHEMA)
        {
            List<Map> results = new ArrayList<Map>(1);
            // Look up a SchemaClass object by the SchemaClassId obtained from the query
            SchemaClassId classId = query.getSchemaClassId();
            SchemaClass schema = _schemaCache.get(classId);
            if (schema != null)
            {
                results.add(schema.mapEncode());
            }
            queryResponse(handle, results, "_schema"); // Send the response back to the Console.
        }
        else if (target == QmfQueryTarget.OBJECT_ID)
        {
View Full Code Here

        // where tools such as qpid-config might have made assumptions about its ObjectId rather than doing "discovery".
        ObjectId addr = object.getObjectId();
        if (addr == null)
        {
            SchemaClassId classId = object.getSchemaClassId();
            SchemaClass schema = _schemaCache.get(classId);

            // Try to create an objectName using the property names that have been specified as idNames in the schema
            StringBuilder buf = new StringBuilder();
            // Initialise idNames as an empty array as we want to check if a key has been used to construct the name.
            String[] idNames = {};
View Full Code Here

        else if (target == QmfQueryTarget.SCHEMA)
        {
            List<Map> results = new ArrayList<Map>(1);
            // Look up a SchemaClass object by the SchemaClassId obtained from the query
            SchemaClassId classId = query.getSchemaClassId();
            SchemaClass schema = _schemaCache.get(classId);
            if (schema != null)
            {
                results.add(schema.mapEncode());
            }
            queryResponse(handle, results, "_schema"); // Send the response back to the Console.
        }
        else if (target == QmfQueryTarget.OBJECT_ID)
        {
View Full Code Here

        // where tools such as qpid-config might have made assumptions about its ObjectId rather than doing "discovery".
        ObjectId addr = object.getObjectId();
        if (addr == null)
        {
            SchemaClassId classId = object.getSchemaClassId();
            SchemaClass schema = _schemaCache.get(classId);

            // Try to create an objectName using the property names that have been specified as idNames in the schema
            StringBuilder buf = new StringBuilder();
            // Initialise idNames as an empty array as we want to check if a key has been used to construct the name.
            String[] idNames = {};
View Full Code Here

                {
                    List<Map> mapResults = AMQPMessage.getList(response);
                    for (Map content : mapResults)
                    {
//new SchemaClassId(content).listValues();
                        results.add(new SchemaClassId(content));
                    }
                }
                else if (AMQPMessage.isAMQPMap(response))
                {
                    // Error responses are returned as MapMessages, though they are being ignored here.
View Full Code Here

     * @param className the schema class name we're looking up objects for.
     * @return a List of QMF Objects describing that class.
     */
    public List<QmfConsoleData> getObjects(final String className)
    {
        return getObjects(new SchemaClassId(className));
    }
View Full Code Here

     * @param timeout overrides the default replyTimeout.
     * @return a List of QMF Objects describing that class.
     */
    public List<QmfConsoleData> getObjects(final String className, final int timeout)
    {
        return getObjects(new SchemaClassId(className), timeout);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.qmf2.common.SchemaClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.