Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.MethodRegistry


    }

    void declareDestination(AMQDestination destination)
    {

        final MethodRegistry methodRegistry = getSession().getMethodRegistry();
        ExchangeDeclareBody body =
                methodRegistry.createExchangeDeclareBody(getSession().getTicket(),
                                                         destination.getExchangeName(),
                                                         destination.getExchangeClass(),
                                                         destination.getExchangeName().toString().startsWith("amq."),
                                                         false,
                                                         false,
View Full Code Here


                                                                          exchangeName + " of type " + exchange.getTypeShortString() + " to " + body.getType() +".",body.getClazz(), body.getMethod(),body.getMajor(),body.getMinor(),null);
            }
        }
        if(!body.getNowait())
        {
            MethodRegistry methodRegistry = session.getMethodRegistry();
            AMQMethodBody responseBody = methodRegistry.createExchangeDeclareOkBody();
            channel.sync();
            session.writeFrame(responseBody.generateFrame(channelId));
        }
    }
View Full Code Here

            {
                throw body.getChannelNotFoundException(channelId);
            }
            channel.commit();

            MethodRegistry methodRegistry = session.getMethodRegistry();
            AMQMethodBody responseBody = methodRegistry.createTxCommitOkBody();
            session.writeFrame(responseBody.generateFrame(channelId));
                       
        }
        catch (AMQException e)
        {
View Full Code Here

     */
    public abstract void acknowledgeMessage(long deliveryTag, boolean multiple);

    public MethodRegistry getMethodRegistry()
    {
        MethodRegistry methodRegistry = getProtocolHandler().getMethodRegistry();
        return methodRegistry;
    }
View Full Code Here

        return getUnacknowledgedMessageMap().size();
    }

    private void flow(boolean flow)
    {
        MethodRegistry methodRegistry = _session.getMethodRegistry();
        AMQMethodBody responseBody = methodRegistry.createChannelFlowBody(flow);
        _session.writeFrame(responseBody.generateFrame(_channelId));
    }
View Full Code Here

    void declareDestination(AMQDestination destination)
    {
        if(getSession().isDeclareExchanges())
        {
            final MethodRegistry methodRegistry = getSession().getMethodRegistry();
            ExchangeDeclareBody body =
                methodRegistry.createExchangeDeclareBody(getSession().getTicket(),
                                                         destination.getExchangeName(),
                                                         destination.getExchangeClass(),
                                                         destination.getExchangeName().toString().startsWith("amq."),
                                                         destination.isExchangeDurable(),
                                                         destination.isExchangeAutoDelete(),
View Full Code Here

        return getUnacknowledgedMessageMap().size();
    }

    private void flow(boolean flow)
    {
        MethodRegistry methodRegistry = _session.getMethodRegistry();
        AMQMethodBody responseBody = methodRegistry.createChannelFlowBody(flow);
        _session.writeFrame(responseBody.generateFrame(_channelId));
    }
View Full Code Here

        else
        {
            _logger.error("Exception caught in" + this + ", closing session explictly: " + throwable, throwable);


            MethodRegistry methodRegistry = MethodRegistry.getMethodRegistry(getProtocolVersion());
            ConnectionCloseBody closeBody = methodRegistry.createConnectionCloseBody(200,new AMQShortString(throwable.getMessage()),0,0);

            writeFrame(closeBody.generateFrame(0));

            _sender.close();
        }
View Full Code Here

        return false;
    }

    public void mgmtClose()
    {
        MethodRegistry methodRegistry = getMethodRegistry();
        ConnectionCloseBody responseBody =
                methodRegistry.createConnectionCloseBody(
                        AMQConstant.REPLY_SUCCESS.getCode(),
                        new AMQShortString("The connection was closed using the broker's management interface."),
                        0,0);

        // This seems ugly but because we use closeConnection in both normal
View Full Code Here

        }
    }

    public void mgmtCloseChannel(int channelId)
    {
        MethodRegistry methodRegistry = getMethodRegistry();
        ChannelCloseBody responseBody =
                methodRegistry.createChannelCloseBody(
                        AMQConstant.REPLY_SUCCESS.getCode(),
                        new AMQShortString("The channel was closed using the broker's management interface."),
                        0,0);

        // This seems ugly but because we use AMQChannel.close() in both normal
View Full Code Here

TOP

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

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.