Package org.apache.qpid.server.message

Examples of org.apache.qpid.server.message.MessageTransferMessage


        {
            return ((AMQMessage)entry.getMessage()).getContentHeaderBody();
        }
        else
        {
            final MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
            BasicContentHeaderProperties props = HeaderPropertiesConverter.convert(message);
            ContentHeaderBody chb = new ContentHeaderBody(props, BasicGetBodyImpl.CLASS_ID);
            chb.bodySize = message.getSize();
            return chb;
        }
    }
View Full Code Here


            exchangeName = pb.getExchange();
            routingKey = pb.getRoutingKey();
        }
        else
        {
            MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
            DeliveryProperties delvProps = message.getHeader().get(DeliveryProperties.class);
            exchangeName = (delvProps == null || delvProps.getExchange() == null) ? null : new AMQShortString(delvProps.getExchange());
            routingKey = (delvProps == null || delvProps.getRoutingKey() == null) ? null : new AMQShortString(delvProps.getRoutingKey());
        }

        final boolean isRedelivered = entry.isRedelivered();
View Full Code Here

            exchangeName = pb.getExchange();
            routingKey = pb.getRoutingKey();
        }
        else
        {
            MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
            DeliveryProperties delvProps = message.getHeader().get(DeliveryProperties.class);
            exchangeName = (delvProps == null || delvProps.getExchange() == null) ? null : new AMQShortString(delvProps.getExchange());
            routingKey = (delvProps == null || delvProps.getRoutingKey() == null) ? null : new AMQShortString(delvProps.getRoutingKey());
        }

        final boolean isRedelivered = entry.isRedelivered();
View Full Code Here

            exchangeName = pb.getExchange();
            routingKey = pb.getRoutingKey();
        }
        else
        {
            MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
            DeliveryProperties delvProps = message.getHeader().get(DeliveryProperties.class);
            exchangeName = (delvProps == null || delvProps.getExchange() == null) ? null : new AMQShortString(delvProps.getExchange());
            routingKey = (delvProps == null || delvProps.getRoutingKey() == null) ? null : new AMQShortString(delvProps.getRoutingKey());
        }

        final boolean isRedelivered = entry.isRedelivered();
View Full Code Here

        {
            return ((AMQMessage)entry.getMessage()).getContentHeaderBody();
        }
        else
        {
            final MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
            BasicContentHeaderProperties props = HeaderPropertiesConverter.convert(message);
            ContentHeaderBody chb = new ContentHeaderBody(props, BasicGetBodyImpl.CLASS_ID);
            chb.bodySize = message.getSize();
            return chb;
        }
    }
View Full Code Here

            exchangeName = pb.getExchange();
            routingKey = pb.getRoutingKey();
        }
        else
        {
            MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
            DeliveryProperties delvProps = message.getHeader().get(DeliveryProperties.class);
            exchangeName = (delvProps == null || delvProps.getExchange() == null) ? null : new AMQShortString(delvProps.getExchange());
            routingKey = (delvProps == null || delvProps.getRoutingKey() == null) ? null : new AMQShortString(delvProps.getRoutingKey());
        }

        final boolean isRedelivered = entry.isRedelivered();
View Full Code Here

            exchangeName = pb.getExchange();
            routingKey = pb.getRoutingKey();
        }
        else
        {
            MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
            DeliveryProperties delvProps = message.getHeader().get(DeliveryProperties.class);
            exchangeName = (delvProps == null || delvProps.getExchange() == null) ? null : new AMQShortString(delvProps.getExchange());
            routingKey = (delvProps == null || delvProps.getRoutingKey() == null) ? null : new AMQShortString(delvProps.getRoutingKey());
        }

        final boolean isRedelivered = entry.isRedelivered();
View Full Code Here

        MessageTransfer xfr;

        if(serverMsg instanceof MessageTransferMessage)
        {

            MessageTransferMessage msg = (MessageTransferMessage) serverMsg;


            Struct[] headers;
            if(msg.getHeader() == null)
            {
                headers = EMPTY_STRUCT_ARRAY;
            }
            else
            {
                headers = msg.getHeader().getStructs();
            }

            ArrayList<Struct> newHeaders = new ArrayList<Struct>(headers.length);
            DeliveryProperties origDeliveryProps = null;
            for(Struct header : headers)
            {
                if(header instanceof DeliveryProperties)
                {
                    origDeliveryProps = (DeliveryProperties) header;
                }
                else
                {
                    newHeaders.add(header);
                }
            }

            DeliveryProperties deliveryProps = new DeliveryProperties();
            if(origDeliveryProps != null)
            {
                if(origDeliveryProps.hasDeliveryMode())
                {
                    deliveryProps.setDeliveryMode(origDeliveryProps.getDeliveryMode());
                }
                if(origDeliveryProps.hasExchange())
                {
                    deliveryProps.setExchange(origDeliveryProps.getExchange());
                }
                if(origDeliveryProps.hasExpiration())
                {
                    deliveryProps.setExpiration(origDeliveryProps.getExpiration());
                }
                if(origDeliveryProps.hasPriority())
                {
                    deliveryProps.setPriority(origDeliveryProps.getPriority());
                }
                if(origDeliveryProps.hasRoutingKey())
                {
                    deliveryProps.setRoutingKey(origDeliveryProps.getRoutingKey());
                }

            }

            deliveryProps.setRedelivered(entry.isRedelivered());

            newHeaders.add(deliveryProps);
            Header header = new Header(newHeaders);

            xfr = new MessageTransfer(_destination,_acceptMode,_acquireMode,header,msg.getBody());
        }
        else
        {
            AMQMessage message_0_8 = (AMQMessage) serverMsg;
            DeliveryProperties deliveryProps = new DeliveryProperties();
View Full Code Here

                }
                else if(serverMsg instanceof MessageTransferMessage)
                {
                    // We have a 0-10 message
                    MessageTransferMessage msg = (MessageTransferMessage) serverMsg;

                    // Create header attributes list
                    String[] headerAttributes = getMessageTransferMessageHeaderProps(msg);
                    Object[] itemValues = {msg.getMessageNumber(), headerAttributes, msg.getSize(), queueEntry.isRedelivered(), position};
                    CompositeData messageData = new CompositeDataSupport(_messageDataType, VIEW_MSGS_COMPOSITE_ITEM_NAMES, itemValues);
                    _messageList.put(messageData);
                }
                else
                {
View Full Code Here

        MessageMetaData_0_10 messageMetaData = new MessageMetaData_0_10(xfr);
        final MessageStore store = getVirtualHost(ssn).getMessageStore();
        StoredMessage<MessageMetaData_0_10> storeMessage = store.addMessage(messageMetaData);
        storeMessage.addContent(0,xfr.getBody());
        storeMessage.flushToStore();
        MessageTransferMessage message = new MessageTransferMessage(storeMessage, ((ServerSession)ssn).getReference());

        ArrayList<AMQQueue> queues = exchange.route(message);


View Full Code Here

TOP

Related Classes of org.apache.qpid.server.message.MessageTransferMessage

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.