Package org.apache.qpid.transport

Examples of org.apache.qpid.transport.ReplyTo



    private AMQMessageDelegate_0_10 generateMessageDelegateWithReplyTo()
    {
        MessageProperties mesProps = new MessageProperties();
        ReplyTo reply = new ReplyTo("amq.direct", "myReplyQueue");
        mesProps.setReplyTo(reply);

        DeliveryProperties delProps = new DeliveryProperties();
        delProps.setExchange("amq.direct");
        delProps.setRoutingKey("myRequestQueue");
View Full Code Here


    /**
     * Header for command messages is created once because it only contains static values.
     */
    private void createHeaderForCommandMessages ()
    {
        ReplyTo replyTo=new ReplyTo();
        replyTo.setRoutingKey(_methodReplyQueueName);
        _messageProperties.setReplyTo(replyTo);
        _deliveryProperties.setRoutingKey(Names.AGENT_ROUTING_KEY);       
        _headerForCommandMessages = new Header(_deliveryProperties, _messageProperties);
    }
View Full Code Here

        return correlationIDAsBytes == null ? null : new String(correlationIDAsBytes);
    }

    public Destination getJMSReplyTo()
    {
        ReplyTo replyTo = _messageProps.getReplyTo();

        if (replyTo == null)
        {
            return null;
        }
        else
        {
            Destination dest = _destinationCache.get(replyTo);
            if (dest == null)
            {
                String exchange = replyTo.getExchange();
                String routingKey = replyTo.getRoutingKey();

                dest = generateDestination(exchange == null ? null : new AMQShortString(exchange),
                        routingKey == null ? null : new AMQShortString(routingKey));

View Full Code Here

               e.setLinkedException(ex);
               throw e;
           }
        }
       
        final ReplyTo replyTo = new ReplyTo(amqd.getExchangeName().toString(), amqd.getRoutingKey().toString());
        _destinationCache.put(replyTo, destination);
        _messageProps.setReplyTo(replyTo);

    }
View Full Code Here

            }

            if(properties.getReplyTo() != null && properties.getReplyTo().length() != 0)
            {
                String origReplyToString = properties.getReplyTo().asString();
                ReplyTo replyTo = new ReplyTo();
                // if the string looks like a binding URL, then attempt to parse it...
                try
                {
                    AMQBindingURL burl = new AMQBindingURL(origReplyToString);
                    AMQShortString routingKey = burl.getRoutingKey();
                    if(routingKey != null)
                    {
                        replyTo.setRoutingKey(routingKey.asString());
                    }

                    AMQShortString exchangeName = burl.getExchangeName();
                    if(exchangeName != null)
                    {
                        replyTo.setExchange(exchangeName.asString());
                    }
                }
                catch (URISyntaxException e)
                {
                    replyTo.setRoutingKey(origReplyToString);
                }
                messageProps.setReplyTo(replyTo);

            }
View Full Code Here

            {
                props.setMessageId("ID:" + messageProps.getMessageId().toString());
            }
            if(messageProps.hasReplyTo())
            {
                ReplyTo replyTo = messageProps.getReplyTo();
                String exchangeName = replyTo.getExchange();
                String routingKey = replyTo.getRoutingKey();
                if(exchangeName == null)
                {
                    exchangeName = "";
                }
View Full Code Here

            messageProps.setCorrelationId(origHeader.getCorrelationId().getBytes());
        }
        final String origReplyTo = origHeader.getReplyTo();
        if(origReplyTo != null && !origReplyTo.equals(""))
        {
            ReplyTo replyTo;
            if(origReplyTo.startsWith("/"))
            {
                replyTo = new ReplyTo("",origReplyTo);
            }
            else if(origReplyTo.contains("/"))
            {
                String[] parts = origReplyTo.split("/",2);
                replyTo = new ReplyTo(parts[0],parts[1]);
            }
            else if(vhost.getExchange(origReplyTo) != null)
            {
                replyTo = new ReplyTo(origReplyTo,"");
            }
            else
            {
                replyTo = new ReplyTo("",origReplyTo);
            }
            messageProps.setReplyTo(replyTo);
        }

        Map<String, Object> appHeaders =
View Full Code Here

TOP

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

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.