Examples of AMQFrame


Examples of org.apache.qpid.framing.AMQFrame

            protocolInitiationReceived((ProtocolInitiation) message);

        }
        else if (message instanceof AMQFrame)
        {
            AMQFrame frame = (AMQFrame) message;
            frameReceived(frame);

        }
        else
        {
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

        _message = message;
    }

    public void send(int channel, Member member) throws AMQException
    {
        member.send(new AMQFrame(channel, _methodConverter.convertToBody(_message.getMessagePublishInfo())));
        member.send(new AMQFrame(channel, _message.getContentHeaderBody()));
        Iterator<ContentChunk> it = _message.getContentBodyIterator();
        while (it.hasNext())
        {
            member.send(new AMQFrame(channel, _methodConverter.convertToBody(it.next())));
        }
    }
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

        }
    }

    private void sendClose(int channel)
    {
        AMQFrame frame =
            ChannelCloseOkBody.createAMQFrame(channel,
                ((AMQConnection) _connection).getProtocolHandler().getProtocolMajorVersion(),
                ((AMQConnection) _connection).getProtocolHandler().getProtocolMinorVersion());

        ((AMQConnection) _connection).getProtocolHandler().writeFrame(frame);
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

//            public Object execute() throws AMQException, FailoverException
//            {

                AMQProtocolHandler protocolHandler = ((AMQConnection) _connection).getProtocolHandler();

                AMQFrame exchangeDeclare =
                        ExchangeDeclareBody.createAMQFrame(channelId,
                                                           protocolHandler.getProtocolMajorVersion(),
                                                           protocolHandler.getProtocolMinorVersion(), null, // arguments
                                                           false, // autoDelete
                                                           false, // durable
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

        if (exchangeName == null)
        {
            throw new AMQException("Exchange exchange must not be null");
        }
        Exchange exchange = virtualHost.getExchangeRegistry().getExchange(exchangeName);
        AMQFrame response;
        if (exchange == null)
        {
            // AMQP version change:  Be aware of possible changes to parameter order as versions change.
            response = ExchangeBoundOkBody.createAMQFrame(evt.getChannelId(),
                major, minor,  // AMQP version (major, minor)
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

        if (!body.nowait)
        {
            // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
            // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
            // Be aware of possible changes to parameter order as versions change.
            final AMQFrame responseFrame = BasicCancelOkBody.createAMQFrame(evt.getChannelId(),
                                                                            (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                            body.consumerTag);    // consumerTag
            protocolSession.writeFrame(responseFrame);
        }
    }
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

        {
            exchangeRegistry.unregisterExchange(body.exchange, body.ifUnused);
            // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
            // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
            // Be aware of possible changes to parameter order as versions change.
            AMQFrame response = ExchangeDeleteOkBody.createAMQFrame(evt.getChannelId(), (byte)8, (byte)0);
            session.writeFrame(response);
        }
        catch (ExchangeInUseException e)
        {
            // TODO: sort out consistent channel close mechanism that does all clean up etc.
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

            }

            // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
            // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
            // Be aware of possible changes to parameter order as versions change.
            AMQFrame response = ConnectionOpenOkBody.createAMQFrame((short) 0,
                                                                    (byte) 8, (byte) 0,    // AMQP version (major, minor)
                                                                    body.virtualHost);
            stateManager.changeState(AMQState.CONNECTION_OPEN);
            session.writeFrame(response);
        }
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

            _logger.error("Error closing protocol session: " + e, e);
        }
        // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
        // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
        // Be aware of possible changes to parameter order as versions change.
        final AMQFrame response = ConnectionCloseOkBody.createAMQFrame(evt.getChannelId(), (byte) 8, (byte) 0);
        session.writeFrame(response);
    }
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame

        _logger.debug("Channel.Flow for channel " + evt.getChannelId() + ", active=" + body.active);

        // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
        // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
        // Be aware of possible changes to parameter order as versions change.
        AMQFrame response = ChannelFlowOkBody.createAMQFrame(evt.getChannelId(),
            (byte)8, (byte)0// AMQP version (major, minor)
            body.active)// active
        session.writeFrame(response);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.