Package org.apache.qpid.transport

Examples of org.apache.qpid.transport.ReplyTo


    /**
     * 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


   * @param bankId the bank identifier.
   * @param brokerId the broker identifier.
   */
  public MethodInvocationRequestMessage(long bankId, long brokerId)
  {
     ReplyTo replyTo=new ReplyTo();
       replyTo.setRoutingKey(Configuration.getInstance().getMethodReplyQueueName());
       _messageProperties = new MessageProperties();
       _messageProperties.setReplyTo(replyTo);

       String routingKey = String.format(Names.AGENT_ROUTING_KEY_PREFIX+"%s.%s", brokerId,bankId);
      
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 = null;
            SoftReference<Destination> ref = _destinationCache.get(replyTo);
            if (ref != null)
            {
              dest = ref.get();
            }
            if (dest == null)
            {
                String exchange = replyTo.getExchange();
                String routingKey = replyTo.getRoutingKey();

                if (AMQDestination.getDefaultDestSyntax() == AMQDestination.DestSyntax.BURL)
                {
           
                    dest = generateDestination(new AMQShortString(exchange), new AMQShortString(routingKey));
View Full Code Here

               throw jmse;
           }

        }
       
        final ReplyTo replyTo = new ReplyTo(amqd.getExchangeName().toString(), amqd.getRoutingKey().toString());
        _destinationCache.put(replyTo, new SoftReference<Destination>(destination));
        _messageProps.setReplyTo(replyTo);

    }
View Full Code Here


    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

            }

            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

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

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

        if ((replyTo == null) || ((replyTo.getExchange() == null) && (replyTo.getRoutingKey() == null)))
        {
            return null;
        }
        else
        {
            Destination dest = _destinationCache.get(replyTo);

            if (dest == null)
            {
                String exchange = replyTo.getExchange();
                String routingKey = replyTo.getRoutingKey();

                if (AMQDestination.getDefaultDestSyntax() == AMQDestination.DestSyntax.BURL)
                {
                    dest = generateDestination(new AMQShortString(exchange), new AMQShortString(routingKey));
                }
View Full Code Here

               jmse.setLinkedException(e);
               throw jmse;
           }
        }

        final ReplyTo replyTo = new ReplyTo(amqd.getExchangeName().toString(), amqd.getRoutingKey().toString());
        _destinationCache.put(replyTo, destination);
        _messageProps.setReplyTo(replyTo);
    }
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

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.