Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.BasicCancelBody


        }
    }

    void sendCancel() throws AMQException, FailoverException
    {
        BasicCancelBody body = getSession().getMethodRegistry().createBasicCancelBody(new AMQShortString(String.valueOf(getConsumerTag())), false);

        final AMQFrame cancelFrame = body.generateFrame(getChannelId());

        getProtocolHandler().syncWrite(cancelFrame, BasicCancelOkBody.class);

        if (_logger.isDebugEnabled())
        {
View Full Code Here


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

        final AMQChannel channel = protocolSession.getChannel(evt.getChannelId());
        final BasicCancelBody body = evt.getMethod();

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

        if (_log.isDebugEnabled())
        {
            _log.debug("BasicCancel: for:" + body.consumerTag +
View Full Code Here

        super.unregisterProtocolSession(ps, channel, consumerTag);

        //signal other members:
        // 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.
        BasicCancelBody request = new BasicCancelBody((byte)8,
                                                      (byte)0,
                                                      BasicCancelBody.getClazz((byte)8, (byte)0),
                                                      BasicCancelBody.getMethod((byte)8, (byte)0),
                                                      getName(),
                                                      false);
View Full Code Here

        return (AMQSession_0_8) super.getSession();
    }

    void sendCancel() throws AMQException, FailoverException
    {
        BasicCancelBody body = getSession().getMethodRegistry().createBasicCancelBody(new AMQShortString(String.valueOf(getConsumerTag())), false);

        final AMQFrame cancelFrame = body.generateFrame(getChannelId());

        getConnection().getProtocolHandler().syncWrite(cancelFrame, BasicCancelOkBody.class);

        if (_logger.isDebugEnabled())
        {
View Full Code Here

        return (AMQSession_0_8) super.getSession();
    }

    void sendCancel() throws AMQException, FailoverException
    {
        BasicCancelBody body = getSession().getMethodRegistry().createBasicCancelBody(new AMQShortString(String.valueOf(getConsumerTag())), false);

        final AMQFrame cancelFrame = body.generateFrame(getChannelId());

        getConnection().getProtocolHandler().syncWrite(cancelFrame, BasicCancelOkBody.class);

        if (_logger.isDebugEnabled())
        {
View Full Code Here

    public void methodReceived(AMQStateManager stateManager, QueueRegistry queueRegistry,
                               ExchangeRegistry exchangeRegistry, AMQProtocolSession protocolSession,
                               AMQMethodEvent<BasicCancelBody> evt) throws AMQException
    {
        final AMQChannel channel = protocolSession.getChannel(evt.getChannelId());
        final BasicCancelBody body = evt.getMethod();
        channel.unsubscribeConsumer(protocolSession, body.consumerTag);
        if(!body.nowait)
        {
            final AMQFrame responseFrame = BasicCancelOkBody.createAMQFrame(evt.getChannelId(), body.consumerTag);
            protocolSession.writeFrame(responseFrame);
View Full Code Here

    {
        //handle locally:
        super.unregisterProtocolSession(ps, channel, consumerTag);

        //signal other members:
        BasicCancelBody request = new BasicCancelBody();
        request.consumerTag = getName();
        _groupMgr.broadcast(new SimpleSendable(request));
    }
View Full Code Here

        return (AMQSession_0_8) super.getSession();
    }

    void sendCancel() throws AMQException, FailoverException
    {
        BasicCancelBody body = getSession().getMethodRegistry().createBasicCancelBody(new AMQShortString(String.valueOf(getConsumerTag())), false);

        final AMQFrame cancelFrame = body.generateFrame(getChannelId());

        getConnection().getProtocolHandler().syncWrite(cancelFrame, BasicCancelOkBody.class);
        postSubscription();
        getSession().sync();
        if (_logger.isDebugEnabled())
View Full Code Here

        return (AMQSession_0_8) super.getSession();
    }

    void sendCancel() throws AMQException, FailoverException
    {
        BasicCancelBody body = getSession().getMethodRegistry().createBasicCancelBody(new AMQShortString(String.valueOf(getConsumerTag())), false);

        final AMQFrame cancelFrame = body.generateFrame(getChannelId());

        getConnection().getProtocolHandler().syncWrite(cancelFrame, BasicCancelOkBody.class);
        postSubscription();
        getSession().sync();
        if (_logger.isDebugEnabled())
View Full Code Here

TOP

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

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.