Package org.apache.qpid.framing.abstraction

Examples of org.apache.qpid.framing.abstraction.MessagePublishInfo


        assertEquals(new Long(0), new Long(_queueMBean.getQueueDepth()));
    }
   
    protected IncomingMessage message(final boolean immediate, long size) throws AMQException
    {
        MessagePublishInfo publish = new MessagePublishInfo()
        {

            public AMQShortString getExchange()
            {
                return null;
View Full Code Here


            {
                final AMQShortString exchange = new AMQShortString(rs.getString(1));
                final AMQShortString routingKey = rs.getString(2) == null ? null : new AMQShortString(rs.getString(2));
                final boolean mandatory = (rs.getShort(3) != (short)0);
                final boolean immediate = (rs.getShort(4) != (short)0);
                MessagePublishInfo info = new MessagePublishInfo()
                                            {

                                                public AMQShortString getExchange()
                                                {
                                                    return exchange;
View Full Code Here

        return null;
    }

    public void publishMessages(InternalTestProtocolSession session, AMQChannel channel, int messages) throws AMQException
    {
        MessagePublishInfo info = new MessagePublishInfo()
        {
            public AMQShortString getExchange()
            {
                return ExchangeDefaults.DEFAULT_EXCHANGE_NAME;
            }

            public void setExchange(AMQShortString exchange)
            {

            }

            public boolean isImmediate()
            {
                return false;
            }

            public boolean isMandatory()
            {
                return false;
            }

            public AMQShortString getRoutingKey()
            {
                return QUEUE_NAME;
            }
        };

        for (int count = 0; count < messages; count++)
        {
            channel.setPublishFrame(info,  _virtualHost.getExchangeRegistry().getExchange(info.getExchange()));

            //Set the body size
            ContentHeaderBody _headerBody = new ContentHeaderBody();
            _headerBody.bodySize = 0;
View Full Code Here

        return null;
    }

    public void publishMessages(InternalTestProtocolSession session, AMQChannel channel, int messages) throws AMQException
    {
        MessagePublishInfo info = new MessagePublishInfo()
        {
            public AMQShortString getExchange()
            {
                return ExchangeDefaults.DEFAULT_EXCHANGE_NAME;
            }

            public void setExchange(AMQShortString exchange)
            {

            }

            public boolean isImmediate()
            {
                return false;
            }

            public boolean isMandatory()
            {
                return false;
            }

            public AMQShortString getRoutingKey()
            {
                return new AMQShortString(getName());
            }
        };

        for (int count = 0; count < messages; count++)
        {
            channel.setPublishFrame(info, _virtualHost.getExchangeRegistry().getExchange(info.getExchange()));

            //Set the body size
            ContentHeaderBody _headerBody = new ContentHeaderBody();
            _headerBody.bodySize = 0;
View Full Code Here

        properties.setDeliveryMode(deliveryMode ? Integer.valueOf(2).byteValue() : Integer.valueOf(1).byteValue());
        FieldTable headers = properties.getHeaders();
        headers.setString("Test", "MST");
        properties.setHeaders(headers);

        MessagePublishInfo messageInfo = new TestMessagePublishInfo(exchange, false, false, routingKey);

        final IncomingMessage currentMessage;


        currentMessage = new IncomingMessage(messageInfo);
View Full Code Here

    public Object entryToObject(TupleInput tupleInput)
    {
        try
        {
            final MessagePublishInfo publishBody = readMessagePublishInfo(tupleInput);
            final ContentHeaderBody contentHeaderBody = readContentHeaderBody(tupleInput);
            final int contentChunkCount = tupleInput.readInt();

            return new MessageMetaData(publishBody, contentHeaderBody, contentChunkCount);
        }
View Full Code Here

        final AMQShortString exchange = AMQShortStringEncoding.readShortString(tupleInput);
        final AMQShortString routingKey = AMQShortStringEncoding.readShortString(tupleInput);
        final boolean mandatory = tupleInput.readBoolean();
        final boolean immediate = tupleInput.readBoolean();

        return new MessagePublishInfo()
        {

            public AMQShortString getExchange()
            {
                return exchange;
View Full Code Here

        assertFalse(channel.getBlocking());
    }

    private IncomingMessage message(final boolean immediate, boolean persistent) throws AMQException
    {
        MessagePublishInfo publish = new MessagePublishInfo()
        {

            public AMQShortString getExchange()
            {
                return null;
View Full Code Here

        assertEquals(new Long(0), new Long(_queueMBean.getQueueDepth()));
    }

    protected IncomingMessage message(final boolean immediate, long size) throws AMQException
    {
        MessagePublishInfo publish = new MessagePublishInfo()
        {

            public AMQShortString getExchange()
            {
                return null;
View Full Code Here

            store.start();

            // store message objects
            ByteBuffer completeContentBody = ByteBuffer.wrap(messageText.getBytes("UTF-8"));
            long bodySize = completeContentBody.limit();
            MessagePublishInfo pubInfoBody = new MessagePublishInfoImpl(new AMQShortString("amq.direct"), false,
                    false, queueName);
            BasicContentHeaderProperties props = new BasicContentHeaderProperties();
            props.setDeliveryMode(Integer.valueOf(BasicContentHeaderProperties.PERSISTENT).byteValue());
            props.setContentType("text/plain");
            props.setType("text/plain");
View Full Code Here

TOP

Related Classes of org.apache.qpid.framing.abstraction.MessagePublishInfo

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.