Examples of FieldTable


Examples of honeycrm.client.field.FieldTable

      } else if (field.isAnnotationPresent(FieldDateAnnotation.class)) {
        fields.put(name, new FieldDate(name, label));
      } else if (field.isAnnotationPresent(FieldTableAnnotation.class)) {
        // TODO pass tableClass to the FieldTable constructor
        // final Class<?> tableClass = field.getAnnotation(FieldTableAnnotation.class).value();
        fields.put(name, new FieldTable(name, label));
      } else if (field.isAnnotationPresent(FieldTextAnnotation.class)) {
        final int width = field.getAnnotation(FieldTextAnnotation.class).width();
        fields.put(name, new FieldText(name, label, width));
      } else if (field.isAnnotationPresent(FieldIntegerAnnotation.class)) {
        final int defaultValue = field.getAnnotation(FieldIntegerAnnotation.class).value();
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable

    private void sendMessageOnExchange(Exchange exchange, String routingKey, boolean deliveryMode)
    {
        //Set MessagePersistence
        BasicContentHeaderProperties properties = new BasicContentHeaderProperties();
        properties.setDeliveryMode(deliveryMode ? Integer.valueOf(2).byteValue() : Integer.valueOf(1).byteValue());
        FieldTable headers = properties.getHeaders();
        headers.setString("Test", "MST");
        properties.setHeaders(headers);

        MessagePublishInfo messageInfo = new TestMessagePublishInfo(exchange, false, false, routingKey);

        final IncomingMessage currentMessage;
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable

    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

Examples of org.apache.qpid.framing.FieldTable

            // 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 (AMQException e)
        {
           throw toJMSException("Cannot create temporary queue",e);
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable

    public void declareAndBind(AMQDestination amqd)
            throws
            AMQException
    {
        declareAndBind(amqd, new FieldTable());
    }
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable

        //Rough check whether the 'isBound' AMQP extension method is supported, by trying to determine if we are connected to Qpid.
        //As older versions of the Qpid broker did not send properties, the value will be assumed true if no server properties
        //are found, or the 'product' entry isn't present, and will only be false if it is present but doesn't match expectation.
        boolean connectedToQpid = true;

        FieldTable serverProperties = _conn.getProtocolHandler().getProtocolSession().getConnectionStartServerProperties();
        if(serverProperties != null)
        {
            if(serverProperties.containsKey(ConnectionStartProperties.PRODUCT))
            {
                //String.valueof to ensure it is non-null, then lowercase it
                String product = String.valueOf(serverProperties.getString(ConnectionStartProperties.PRODUCT)).toLowerCase();

                //value is "unknown" when the naming properties file hasn't been found, e.g in IDE.
                connectedToQpid = product.contains("qpid") || product.equals("unknown");
            }
        }
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable

        AMQHeadersExchange queue =
            new AMQHeadersExchange(new AMQBindingURL(
                    ExchangeDefaults.HEADERS_EXCHANGE_CLASS + "://" + ExchangeDefaults.HEADERS_EXCHANGE_NAME
                    + "/test/queue1?" + BindingURL.OPTION_ROUTING_KEY + "='F0000=1'"));

        FieldTable ft = new FieldTable();
        ft.setString("x-match", "any");
        ft.setString("F1000", "1");
        consumerSession.declareAndBind(queue, ft);
        MessageConsumer consumer = consumerSession.createConsumer(queue);
        // force synch to ensure the consumer has resulted in a bound queue
        // ((AMQSession) consumerSession).declareExchangeSynch(ExchangeDefaults.HEADERS_EXCHANGE_NAME, ExchangeDefaults.HEADERS_EXCHANGE_CLASS);
        // This is the default now
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable

                    BindingRecord oldBindingRecord = bindingTuple.entryToObject(key);

                    AMQShortString queueName = oldBindingRecord.getQueueName();
                    AMQShortString exchangeName = oldBindingRecord.getExchangeName();
                    AMQShortString routingKey = oldBindingRecord.getRoutingKey();
                    FieldTable arguments = oldBindingRecord.getArguments();

                    if (_logger.isDebugEnabled())
                    {
                        _logger.debug(String.format(
                                "Processing binding for queue %s, exchange %s, routingKey %s arguments %s", queueName,
                                exchangeName, routingKey, arguments));
                    }

                    // if the queue name is in the gathered list then inspect its binding arguments
                    // only topic exchange should have a JMS selector key in binding
                    if (potentialDurableSubs.contains(queueName)
                            && exchangeName.equals(AMQShortString.valueOf(ExchangeDefaults.TOPIC_EXCHANGE_NAME)))
                    {
                        if (arguments == null)
                        {
                            arguments = new FieldTable();
                        }

                        AMQShortString selectorFilterKey = AMQPFilterTypes.JMS_SELECTOR.getValue();
                        if (!arguments.containsKey(selectorFilterKey))
                        {
                            if (_logger.isDebugEnabled())
                            {
                                _logger.info("adding the empty string (i.e. 'no selector') value for " + queueName
                                        + " and exchange " + exchangeName);
                            }
                            arguments.put(selectorFilterKey, "");
                        }
                    }
                    addBindingToDatabase(bindingTuple, targetDatabase, transaction, queueName, exchangeName, routingKey,
                            arguments);
                }
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable

                DatabaseEntry newValue = new DatabaseEntry();
                binding.objectToEntry(record, newValue);
                newQueueDatabase.put(transaction, key, newValue);

                FieldTable emptyArguments = new FieldTable();
                addBindingToDatabase(bindingTuple, newBindingsDatabase, transaction, queueNameAMQ,
                        AMQShortString.valueOf(ExchangeDefaults.DIRECT_EXCHANGE_NAME), queueNameAMQ, emptyArguments);

                // TODO QPID-3490 we should not persist a default exchange binding
                addBindingToDatabase(bindingTuple, newBindingsDatabase, transaction, queueNameAMQ,
View Full Code Here

Examples of org.apache.qpid.framing.FieldTable

        @Override
        public QueueRecord entryToObject(final TupleInput input)
        {
            AMQShortString name = AMQShortStringEncoding.readShortString(input);
            AMQShortString owner = AMQShortStringEncoding.readShortString(input);
            FieldTable arguments = FieldTableEncoding.readFieldTable(input);
            boolean exclusive = input.available() > 0 && input.readBoolean();
            exclusive = exclusive || _durableSubNames.contains(name);

            return new QueueRecord(name, owner, exclusive, arguments);
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.