Search in sources :

Example 11 with DestinationAddress

use of org.apache.qpid.server.model.DestinationAddress in project qpid-broker-j by apache.

the class MessageConverter_Internal_to_v0_10 method getReplyTo.

private ReplyTo getReplyTo(final NamedAddressSpace addressSpace, final String origReplyTo) {
    DestinationAddress destinationAddress = new DestinationAddress(addressSpace, origReplyTo);
    MessageDestination messageDestination = destinationAddress.getMessageDestination();
    final String exchange = ensureStr8("reply-to[\"exchange\"]", messageDestination instanceof Exchange ? messageDestination.getName() : "");
    final String routingKey = ensureStr8("reply-to[\"routing-key\"]", messageDestination instanceof Queue ? messageDestination.getName() : destinationAddress.getRoutingKey());
    return new ReplyTo(exchange, routingKey);
}
Also used : Exchange(org.apache.qpid.server.model.Exchange) ReplyTo(org.apache.qpid.server.protocol.v0_10.transport.ReplyTo) MessageDestination(org.apache.qpid.server.message.MessageDestination) Queue(org.apache.qpid.server.model.Queue) DestinationAddress(org.apache.qpid.server.model.DestinationAddress)

Aggregations

MessageDestination (org.apache.qpid.server.message.MessageDestination)11 DestinationAddress (org.apache.qpid.server.model.DestinationAddress)11 Exchange (org.apache.qpid.server.model.Exchange)8 Queue (org.apache.qpid.server.model.Queue)8 ReplyTo (org.apache.qpid.server.protocol.v0_10.transport.ReplyTo)2 AMQShortString (org.apache.qpid.server.protocol.v0_8.AMQShortString)2 MessagePublishInfo (org.apache.qpid.server.protocol.v0_8.transport.MessagePublishInfo)2 RoutingResult (org.apache.qpid.server.message.RoutingResult)1 MessageConversionException (org.apache.qpid.server.protocol.converter.MessageConversionException)1 AmqpErrorException (org.apache.qpid.server.protocol.v1_0.type.AmqpErrorException)1