Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.FieldTable


            return getReplyTo();
        }

        public Object getHeader(String name)
        {
            FieldTable ft = getProperties().getHeaders();
            return ft.get(name);
        }
View Full Code Here


            return ft.get(name);
        }

        public boolean containsHeaders(Set<String> names)
        {
            FieldTable ft = getProperties().getHeaders();
            for(String name : names)
            {
                if(!ft.containsKey(name))
                {
                    return false;
                }
            }
            return true;
View Full Code Here

            return true;
        }

        public boolean containsHeader(String name)
        {
            FieldTable ft = getProperties().getHeaders();
            return ft.containsKey(name);
        }
View Full Code Here

        _expected = load();
    }

    private FieldTable load() throws IOException
    {
        FieldTable result = FieldTableFactory.newFieldTable();
        result.setLong("one", 1L);
        result.setLong("two", 2L);
        result.setLong("three", 3L);
        result.setLong("four", 4L);
        result.setLong("five", 5L);

        return result;
    }
View Full Code Here

    void check() throws JMSException, AMQFrameDecodingException
    {
        for (Object m : received)
        {
            ByteBuffer buffer = ((JMSBytesMessage) m).getData();
            FieldTable actual = FieldTableFactory.newFieldTable(buffer, buffer.remaining());
            for (String key : _expected.keys())
            {
                assertEquals("Values for " + key + " did not match", _expected.getObject(key), actual.getObject(key));
            }
        }
    }
View Full Code Here

    public void addBindingKey(C consumer, AMQDestination amqd, String routingKey) throws AMQException
    {
        if (consumer.getQueuename() != null)
        {
            bindQueue(consumer.getQueuename(), new AMQShortString(routingKey), new FieldTable(), amqd.getExchangeName(), amqd);
        }
    }
View Full Code Here

            // this is done so that we can produce to a temporary queue before we create a consumer
            result.setQueueName(result.getRoutingKey());
            createQueue(result.getAMQQueueName(), result.isAutoDelete(),
                        result.isDurable(), result.isExclusive());
            bindQueue(result.getAMQQueueName(), result.getRoutingKey(),
                    new FieldTable(), result.getExchangeName(), result);
            return result;
        }
        catch (Exception e)
        {
           JMSException jmse = new JMSException("Cannot create temporary queue");
View Full Code Here

            AMQException
    {
        AMQProtocolHandler protocolHandler = getProtocolHandler();
        declareExchange(amqd, protocolHandler, false);
        AMQShortString queueName = declareQueue(amqd, protocolHandler, false);
        bindQueue(queueName, amqd.getRoutingKey(), new FieldTable(), amqd.getExchangeName(), amqd);
    }
View Full Code Here

                        AMQDestination amqd = (AMQDestination) destination;

                        // TODO: Define selectors in AMQP
                        // TODO: construct the rawSelector from the selector string if rawSelector == null
                        final FieldTable ft = FieldTableFactory.newFieldTable();
                        // if (rawSelector != null)
                        // ft.put("headers", rawSelector.getDataAsBytes());
                        // rawSelector is used by HeadersExchange and is not a JMS Selector
                        if (rawSelector != null)
                        {
                            ft.addAll(rawSelector);
                        }

                        // We must always send the selector argument even if empty, so that we can tell when a selector is removed from a
                        // durable topic subscription that the broker arguments don't match any more. This is because it is not otherwise
                        // possible to determine  when querying the broker whether there are no arguments or just a non-matching selector
                        // argument, as specifying null for the arguments when querying means they should not be checked at all
                        ft.put(AMQPFilterTypes.JMS_SELECTOR.getValue(), messageSelector == null ? "" : messageSelector);

                        C consumer = createMessageConsumer(amqd, prefetchHigh, prefetchLow,
                                                                              noLocal, exclusive, messageSelector, ft, noConsume, autoClose);

                        if (_messageListener != null)
View Full Code Here

                BindingRecord bindingRecord = bindingTuple.entryToObject(key);

                AMQShortString queueName = bindingRecord.getQueueName();
                AMQShortString exchangeName = bindingRecord.getExchangeName();
                AMQShortString routingKey = bindingRecord.getRoutingKey();
                FieldTable arguments = bindingRecord.getArguments();
                queueBindings.add(new BindingRecord(exchangeName, queueName, routingKey, arguments));
            }
        };
        new DatabaseTemplate(_environment, BINDING_DB_NAME, null).run(databaseOperation);
        return queueBindings;
View Full Code Here

TOP

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

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.