Package org.apache.qpid.amqp_1_0.transport

Examples of org.apache.qpid.amqp_1_0.transport.SendingLinkEndpoint


    protected SessionImpl(final ConnectionImpl connection, final AcknowledgeMode acknowledgeMode) throws JMSException
    {
        _connection = connection;
        _acknowledgeMode = acknowledgeMode;
        Connection clientConn = _connection.getClientConnection();
        try
        {
            _session = clientConn.createSession();
        }
        catch (ConnectionException e)
        {
            JMSException jmsException;
            if (e instanceof ChannelsExhaustedException)
View Full Code Here


                            return;
                        }
                    }
                    while(!_closed && (_started && (_recoveredMessage != null || !_messageConsumerList.isEmpty())))
                    {
                        Message msg;

                        MessageConsumerImpl consumer;

                        boolean recoveredMessage =  _recoveredMessage != null;
                        if(recoveredMessage)
                        {
                            consumer = _recoveredConsumer;
                            msg = _recoveredMessage;
                            _recoveredMessage = null;
                            _recoveredConsumer = null;
                        }
                        else
                        {
                            consumer = _messageConsumerList.remove(0);
                            msg = consumer.receive0(0L);
                        }

                        MessageListener listener = consumer._messageListener;

                        MessageImpl message = consumer.createJMSMessage(msg, recoveredMessage);

                        if(message != null)
                        {
                            if(_acknowledgeMode == AcknowledgeMode.CLIENT_ACKNOWLEDGE)
                            {
                                consumer.setLastUnackedMessage(msg.getDeliveryTag());
                            }
                            _currentConsumer = consumer;
                            _currentMessage = msg;
                            try
                            {
View Full Code Here

        Target target = new Target();
        target.setAddress(UUID.randomUUID().toString());

        try
        {
            Receiver receiver = new Receiver(getClientSession(), s, target, null,
                                             org.apache.qpid.amqp_1_0.client.AcknowledgeMode.ALO, false);

            final org.apache.qpid.amqp_1_0.type.Source receiverSource = receiver.getSource();
            if(receiverSource instanceof Source)
            {
                Source source = (Source) receiverSource;
                receiver.close();
                receiver = new Receiver(getClientSession(), s, target, source,
                        org.apache.qpid.amqp_1_0.client.AcknowledgeMode.ALO, false);

            }
            receiver.close();
        }
        catch(ConnectionErrorException  e)
        {
            if(e.getRemoteError().getCondition() == AmqpError.NOT_FOUND)
            {
View Full Code Here

    {
        checkClosed();
        checkNotTopicSession();
        try
        {
            Sender send = _session.createTemporaryQueueSender();

            TemporaryQueueImpl tempQ = new TemporaryQueueImpl(((Target)send.getTarget()).getAddress(), send, this);
            return tempQ;
        }
        catch (Sender.SenderCreationException e)
        {
            throw new JMSException("Unable to create temporary queue");
View Full Code Here

    {
        checkClosed();
        checkNotQueueSession();
        try
        {
            Sender send = _session.createTemporaryQueueSender();

            TemporaryTopicImpl tempQ = new TemporaryTopicImpl(((Target)send.getTarget()).getAddress(), send, this);
            return tempQ;
        }
        catch (Sender.SenderCreationException e)
        {
            throw new JMSException("Unable to create temporary queue");
View Full Code Here

        private final ByteBuffer _buffer = ByteBuffer.wrap(_bytes);

        public FrameToBytesSourceAdapter(final FrameSource frameSource, ValueWriter.Registry registry)
        {
            _frameSource = frameSource;
            _writer =  new FrameWriter(registry);
        }
View Full Code Here

    private static final Logger RAW_LOGGER = Logger.getLogger("RAW");

    public ConnectionHandler(final ConnectionEndpoint connection)
    {
        _connection = connection;
        _delegate = new ProtocolHeaderHandler(connection);
    }
View Full Code Here


    public FrameHandler(final ConnectionEndpoint connection)
    {
        _connection = connection;
        _typeHandler = new ValueHandler(connection.getDescribedTypeRegistry());

    }
View Full Code Here

            System.out.println((midTime - startTime));

        }


        ValueHandler handler = new ValueHandler(registry);
        System.out.println("------ Decode (time in ms for 1 million opens)");
        for(int n = 0; n < 100; n++)
        {
            long startTime = System.currentTimeMillis();
            for(int i = 1000000; i !=0; i--)
            {
                buf.flip();
                handler.parse(buf);
                handler.parse(buf);
                handler.parse(buf);

            }
            long midTime = System.currentTimeMillis();
            System.out.println((midTime - startTime));
        }
View Full Code Here

        }

        if(queueEntry.getDeliveryCount() != 0)
        {
            payload = payload.duplicate();
            ValueHandler valueHandler = new ValueHandler(_typeRegistry);

            Header oldHeader = null;
            try
            {
                ByteBuffer encodedBuf = payload.duplicate();
                Object value = valueHandler.parse(payload);
                if(value instanceof Header)
                {
                    oldHeader = (Header) value;
                }
                else
View Full Code Here

TOP

Related Classes of org.apache.qpid.amqp_1_0.transport.SendingLinkEndpoint

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.