Package org.apache.qpid.server.message

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


        final ServerSession serverSession = (ServerSession) ssn;
        if(!queues.isEmpty())
        {
            final MessageStore store = getVirtualHost(ssn).getMessageStore();
            final StoredMessage<MessageMetaData_0_10> storeMessage = createStoreMessage(xfr, messageMetaData, store);
            MessageTransferMessage message = new MessageTransferMessage(storeMessage, serverSession.getReference());
            serverSession.enqueue(message, queues);
            storeMessage.flushToStore();
        }
        else
        {
View Full Code Here


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

            exchangeName = pb.getExchange();
            routingKey = pb.getRoutingKey();
        }
        else
        {
            MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
            DeliveryProperties delvProps = message.getHeader().getDeliveryProperties();
            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().getDeliveryProperties();
            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

        MessageProperties messageProps = null;

        if(serverMsg instanceof MessageTransferMessage)
        {

            MessageTransferMessage msg = (MessageTransferMessage) serverMsg;
            DeliveryProperties origDeliveryProps = msg.getHeader() == null ? null : msg.getHeader().getDeliveryProperties();
            messageProps = msg.getHeader() == null ? null : msg.getHeader().getMessageProperties();

            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());
                }
                if(origDeliveryProps.hasTimestamp())
                {
                    deliveryProps.setTimestamp(origDeliveryProps.getTimestamp());
                }
                if(origDeliveryProps.hasTtl())
                {
                    deliveryProps.setTtl(origDeliveryProps.getTtl());
                }


            }

            deliveryProps.setRedelivered(entry.isRedelivered());

            if(_trace != null && messageProps == null)
            {
                messageProps = new MessageProperties();
            }

            Header header = new Header(deliveryProps, messageProps, msg.getHeader() == null ? null : msg.getHeader().getNonStandardProperties());


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

        {
            case META_DATA_0_8:
                serverMessage = new AMQMessage(message);
                break;
            case META_DATA_0_10:
                serverMessage = new MessageTransferMessage(message, null);
                break;
            default:
                throw new RuntimeException("Unknown message type retrieved from store " + message.getMetaData().getClass());
        }
View Full Code Here

        final ServerSession serverSession = (ServerSession) ssn;
        if(!queues.isEmpty())
        {
            final MessageStore store = getVirtualHost(ssn).getMessageStore();
            final StoredMessage<MessageMetaData_0_10> storeMessage = createStoreMessage(xfr, messageMetaData, store);
            MessageTransferMessage message = new MessageTransferMessage(storeMessage, serverSession.getReference());
            serverSession.enqueue(message, queues);
            storeMessage.flushToStore();
        }
        else
        {
View Full Code Here

        {
            case META_DATA_0_8:
                serverMessage = new AMQMessage(message);
                break;
            case META_DATA_0_10:
                serverMessage = new MessageTransferMessage(message, null);
                break;
            default:
                throw new RuntimeException("Unknown message type retrieved from store " + message.getMetaData().getClass());
        }
View Full Code Here

        MessageProperties messageProps = null;

        if(serverMsg instanceof MessageTransferMessage)
        {

            MessageTransferMessage msg = (MessageTransferMessage) serverMsg;
            DeliveryProperties origDeliveryProps = msg.getHeader() == null ? null : msg.getHeader().getDeliveryProperties();
            messageProps = msg.getHeader() == null ? null : msg.getHeader().getMessageProperties();

            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());
                }
                if(origDeliveryProps.hasTimestamp())
                {
                    deliveryProps.setTimestamp(origDeliveryProps.getTimestamp());
                }
                if(origDeliveryProps.hasTtl())
                {
                    deliveryProps.setTtl(origDeliveryProps.getTtl());
                }


            }

            deliveryProps.setRedelivered(entry.isRedelivered());

            if(_trace != null && messageProps == null)
            {
                messageProps = new MessageProperties();
            }

            Header header = new Header(deliveryProps, messageProps, msg.getHeader() == null ? null : msg.getHeader().getNonStandardProperties());


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

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

            List<? extends BaseQueue> 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.