Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.BasicPublishBody


        return new ContentBody(data);
    }

    public MessagePublishInfo convertToInfo(AMQMethodBody methodBody)
    {
        final BasicPublishBody publishBody = ((BasicPublishBody) methodBody);

        final AMQShortString exchange = publishBody.getExchange();
        final AMQShortString routingKey = publishBody.getRoutingKey();

        return new MessagePublishInfoImpl(exchange == null ? null : exchange.intern(),
                                          publishBody.getImmediate(),
                                          publishBody.getMandatory(),
                                          routingKey == null ? null : routingKey.intern(false));

    }
View Full Code Here


    void sendMessage(AMQDestination destination, Message origMessage, AbstractJMSMessage message,
                     UUID messageId, int deliveryMode,int priority, long timeToLive, boolean mandatory,
                     boolean immediate) throws JMSException
    {
        BasicPublishBody body = getSession().getMethodRegistry().createBasicPublishBody(getSession().getTicket(),
                                                                                        destination.getExchangeName(),
                                                                                        destination.getRoutingKey(),
                                                                                        mandatory,
                                                                                        immediate);

        AMQFrame publishFrame = body.generateFrame(getChannelId());

        message.prepareForSending();
        ByteBuffer payload = message.getData();
        AMQMessageDelegate_0_8 delegate = (AMQMessageDelegate_0_8) message.getDelegate();
        BasicContentHeaderProperties contentHeaderProperties = delegate.getContentHeaderProperties();
View Full Code Here

    void sendMessage(AMQDestination destination, Message origMessage, AbstractJMSMessage message,
                     UUID messageId, int deliveryMode,int priority, long timeToLive, boolean mandatory,
                     boolean immediate) throws JMSException
    {
        BasicPublishBody body = getSession().getMethodRegistry().createBasicPublishBody(getSession().getTicket(),
                                                                                        destination.getExchangeName(),
                                                                                        destination.getRoutingKey(),
                                                                                        mandatory,
                                                                                        immediate);

        AMQFrame publishFrame = body.generateFrame(getChannelId());

        message.prepareForSending();
        ByteBuffer payload = message.getData();
        AMQMessageDelegate_0_8 delegate = (AMQMessageDelegate_0_8) message.getDelegate();
        BasicContentHeaderProperties contentHeaderProperties = delegate.getContentHeaderProperties();
View Full Code Here

    void sendMessage(AMQDestination destination, Message origMessage, AbstractJMSMessage message,
                     UUID messageId, int deliveryMode,int priority, long timeToLive, boolean mandatory,
                     boolean immediate, boolean wait) throws JMSException
    {
        BasicPublishBody body = getSession().getMethodRegistry().createBasicPublishBody(_session.getTicket(),
                                                                                        destination.getExchangeName(),
                                                                                        destination.getRoutingKey(),
                                                                                        mandatory,
                                                                                        immediate);

        AMQFrame publishFrame = body.generateFrame(_channelId);

        message.prepareForSending();
        ByteBuffer payload = message.getData();
        AMQMessageDelegate_0_8 delegate = (AMQMessageDelegate_0_8) message.getDelegate();
        BasicContentHeaderProperties contentHeaderProperties = delegate.getContentHeaderProperties();
View Full Code Here

    void sendMessage(AMQDestination destination, Message origMessage, AbstractJMSMessage message,
                     UUID messageId, int deliveryMode,int priority, long timeToLive, boolean mandatory,
                     boolean immediate, boolean wait) throws JMSException
    {
        BasicPublishBody body = getSession().getMethodRegistry().createBasicPublishBody(_session.getTicket(),
                                                                                        destination.getExchangeName(),
                                                                                        destination.getRoutingKey(),
                                                                                        mandatory,
                                                                                        immediate);

        AMQFrame publishFrame = body.generateFrame(_channelId);

        message.prepareForSending();
        ByteBuffer payload = message.getData();
        AMQMessageDelegate_0_8 delegate = (AMQMessageDelegate_0_8) message.getDelegate();
        BasicContentHeaderProperties contentHeaderProperties = delegate.getContentHeaderProperties();
View Full Code Here

    public void methodReceived(AMQStateManager stateManager, AMQMethodEvent<BasicPublishBody> evt) throws AMQException
    {
        AMQProtocolSession session = stateManager.getProtocolSession();

        final BasicPublishBody body = evt.getMethod();

        if (_log.isDebugEnabled())
        {
            _log.debug("Publish received on channel " + evt.getChannelId());
        }

        // TODO: check the delivery tag field details - is it unique across the broker or per subscriber?
        if (body.exchange == null)
        {
            body.exchange = ExchangeDefaults.DEFAULT_EXCHANGE_NAME;

        }
        else
        {
            body.exchange = body.exchange.intern();
        }
        VirtualHost vHost = session.getVirtualHost();
        Exchange e = vHost.getExchangeRegistry().getExchange(body.exchange);
        // if the exchange does not exist we raise a channel exception
        if (e == null)
        {
            throw body.getChannelException(AMQConstant.NOT_FOUND, "Unknown exchange name");
        }
        else
        {
            // The partially populated BasicDeliver frame plus the received route body
            // is stored in the channel. Once the final body frame has been received
            // it is routed to the exchange.
            AMQChannel channel = session.getChannel(evt.getChannelId());

            if (channel == null)
            {
                throw body.getChannelNotFoundException(evt.getChannelId());
            }

            if(body.routingKey != null)
            {
                body.routingKey = body.routingKey.intern();
View Full Code Here

        return new ContentBody(data);
    }

    public MessagePublishInfo convertToInfo(AMQMethodBody methodBody)
    {
        final BasicPublishBody publishBody = ((BasicPublishBody) methodBody);

        final AMQShortString exchange = publishBody.getExchange();
        final AMQShortString routingKey = publishBody.getRoutingKey();

        return new MessagePublishInfoImpl(exchange,
                                          publishBody.getImmediate(),
                                          publishBody.getMandatory(),
                                          routingKey);

    }
View Full Code Here

        return new ContentBody(data);
    }

    public MessagePublishInfo convertToInfo(AMQMethodBody methodBody)
    {
        final BasicPublishBody publishBody = ((BasicPublishBody) methodBody);

        final AMQShortString exchange = publishBody.getExchange();
        final AMQShortString routingKey = publishBody.getRoutingKey();

        return new MessagePublishInfoImpl(exchange == null ? null : exchange.intern(),
                                          publishBody.getImmediate(),
                                          publishBody.getMandatory(),
                                          routingKey == null ? null : routingKey.intern());

    }
View Full Code Here

        return new ContentBody(data);
    }

    public MessagePublishInfo convertToInfo(AMQMethodBody methodBody)
    {
        final BasicPublishBody publishBody = ((BasicPublishBody) methodBody);

        final AMQShortString exchange = publishBody.getExchange();
        final AMQShortString routingKey = publishBody.getRoutingKey();

        return new MessagePublishInfoImpl(exchange,
                                          publishBody.getImmediate(),
                                          publishBody.getMandatory(),
                                          routingKey);

    }
View Full Code Here

    void sendMessage(AMQDestination destination, Message origMessage, AbstractJMSMessage message,
                     UUID messageId, int deliveryMode,int priority, long timeToLive, boolean mandatory,
                     boolean immediate) throws JMSException
    {
        BasicPublishBody body = getSession().getMethodRegistry().createBasicPublishBody(getSession().getTicket(),
                                                                                        destination.getExchangeName(),
                                                                                        destination.getRoutingKey(),
                                                                                        mandatory,
                                                                                        immediate);

        AMQFrame publishFrame = body.generateFrame(getChannelId());

        message.prepareForSending();
        ByteBuffer payload = message.getData();
        AMQMessageDelegate_0_8 delegate = (AMQMessageDelegate_0_8) message.getDelegate();
        BasicContentHeaderProperties contentHeaderProperties = delegate.getContentHeaderProperties();
View Full Code Here

TOP

Related Classes of org.apache.qpid.framing.BasicPublishBody

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.