Package org.apache.qpid.transport

Examples of org.apache.qpid.transport.ExchangeQueryResult


    {
        if (exchange != null && !exchangeMapContains(exchange))
        {
            Future<ExchangeQueryResult> future =
                    session.exchangeQuery(exchange.toString());
            ExchangeQueryResult res = future.get();

            updateExchangeType(exchange, res.getType());
        }
    }
View Full Code Here


            if (exchange != null && !exchangeMapContains(exchange))
            {
                Future<ExchangeQueryResult> future =
                        session.exchangeQuery(exchange.toString());
                ExchangeQueryResult res = future.get();

                updateExchangeType(exchange, res.getType());
            }
        }
    }
View Full Code Here

    }
   
    public boolean isExchangeExist(AMQDestination dest,boolean assertNode)
    {
        boolean match = true;
        ExchangeQueryResult result = getQpidSession().exchangeQuery(dest.getAddressName(), Option.NONE).get();
        match = !result.getNotFound();       
        Node node = dest.getNode();
       
        if (match)
        {
            if (assertNode)
            {
                match =  (result.getDurable() == node.isDurable()) &&
                         (node.getExchangeType() != null &&
                          node.getExchangeType().equals(result.getType())) &&
                         (matchProps(result.getArguments(),node.getDeclareArgs()));
            }
            else
            {
                _logger.debug("Setting Exchange type " + result.getType());
                node.setExchangeType(result.getType());
                dest.setExchangeClass(new AMQShortString(result.getType()));
            }
        }
        return match;
    }
View Full Code Here

    {
        if (exchange != null && !exchangeMapContains(exchange))
        {
            Future<ExchangeQueryResult> future =
                    session.exchangeQuery(exchange.toString());
            ExchangeQueryResult res = future.get();

            updateExchangeType(exchange, res.getType());
        }
    }
View Full Code Here

    {
        if (exchange != null && !exchangeMapContains(exchange))
        {
            Future<ExchangeQueryResult> future =
                    session.exchangeQuery(exchange.toString());
            ExchangeQueryResult res = future.get();

            updateExchangeType(exchange, res.getType());
        }
    }
View Full Code Here

    }

    public boolean isExchangeExist(AMQDestination dest,boolean assertNode) throws AMQException
    {
        boolean match = true;
        ExchangeQueryResult result = getQpidSession().exchangeQuery(dest.getAddressName(), Option.NONE).get();
        match = !result.getNotFound();
        Node node = dest.getNode();

        if (match)
        {
            if (assertNode)
            {
                match =  (result.getDurable() == node.isDurable()) &&
                         (node.getExchangeType() != null &&
                          node.getExchangeType().equals(result.getType())) &&
                         (matchProps(result.getArguments(),node.getDeclareArgs()));
            }
            else
            {
                _logger.debug("Setting Exchange type " + result.getType());
                node.setExchangeType(result.getType());
                dest.setExchangeClass(new AMQShortString(result.getType()));
            }
        }

        if (assertNode)
        {
View Full Code Here

    {
        if (exchange != null && !exchangeMapContains(exchange))
        {
            Future<ExchangeQueryResult> future =
                    session.exchangeQuery(exchange.toString());
            ExchangeQueryResult res = future.get();

            updateExchangeType(exchange, res.getType());
        }
    }
View Full Code Here

    @Override
    public void exchangeQuery(Session session, ExchangeQuery method)
    {

        ExchangeQueryResult result = new ExchangeQueryResult();

        Exchange exchange = getExchange(session, method.getName());

        if(exchange != null)
        {
            result.setDurable(exchange.isDurable());
            result.setType(exchange.getTypeShortString().toString());
            result.setNotFound(false);
        }
        else
        {
            result.setNotFound(true);
        }

        session.executionResult((int) method.getId(), result);
    }
View Full Code Here

    }
   
    public boolean isExchangeExist(AMQDestination dest,ExchangeNode node,boolean assertNode)
    {
        boolean match = true;
        ExchangeQueryResult result = getQpidSession().exchangeQuery(dest.getAddressName(), Option.NONE).get();
        match = !result.getNotFound();       
       
        if (match)
        {
            if (assertNode)
            {
                match =  (result.getDurable() == node.isDurable()) &&
                         (node.getExchangeType() != null &&
                          node.getExchangeType().equals(result.getType())) &&
                         (matchProps(result.getArguments(),node.getDeclareArgs()));
            }           
            else if (node.getExchangeType() != null)
            {
                // even if assert is false, better to verify this
                match = node.getExchangeType().equals(result.getType());
                if (!match)
                {
                    _logger.debug("Exchange type doesn't match. Expected : " +  node.getExchangeType() +
                             " actual " + result.getType());
                }
            }
            else
            {
                _logger.debug("Setting Exchange type " + result.getType());
                node.setExchangeType(result.getType());
                dest.setExchangeClass(new AMQShortString(result.getType()));
            }
        }
       
        return match;
    }
View Full Code Here

    }

    public boolean isExchangeExist(AMQDestination dest,boolean assertNode) throws AMQException
    {
        boolean match = true;
        ExchangeQueryResult result = getQpidSession().exchangeQuery(dest.getAddressName(), Option.NONE).get();
        match = !result.getNotFound();
        Node node = dest.getNode();

        if (match)
        {
            if (assertNode)
            {
                match =  (result.getDurable() == node.isDurable()) &&
                         (node.getExchangeType() != null &&
                          node.getExchangeType().equals(result.getType())) &&
                         (matchProps(result.getArguments(),node.getDeclareArgs()));
            }
            else
            {
                _logger.debug("Setting Exchange type " + result.getType());
                node.setExchangeType(result.getType());
                dest.setExchangeClass(new AMQShortString(result.getType()));
            }
        }

        if (assertNode)
        {
View Full Code Here

TOP

Related Classes of org.apache.qpid.transport.ExchangeQueryResult

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.