Examples of MapAccessor


Examples of org.apache.qpid.configuration.Accessor.MapAccessor

    public AddressHelper(Address address)
    {
        this._address = address;
        this._addressPropMap = address.getOptions();
        this._addressPropAccess = new MapAccessor(_addressPropMap);
        this._nodePropMap = address.getOptions() == null
                || address.getOptions().get(NODE) == null ? null
                : (Map) address.getOptions().get(NODE);

        if (_nodePropMap != null)
        {
            _nodePropAccess = new MapAccessor(_nodePropMap);
        }

        this._linkPropMap = address.getOptions() == null
                || address.getOptions().get(LINK) == null ? null
                : (Map) address.getOptions().get(LINK);

        if (_linkPropMap != null)
        {
            _linkPropAccess = new MapAccessor(_linkPropMap);
        }
    }
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

    {
        Node node = new Node(_address.getName());
        if (_nodePropAccess != null)
        {
            Map xDeclareMap = getDeclareArgs(_nodePropMap);
            MapAccessor xDeclareMapAccessor = new MapAccessor(xDeclareMap);

            node.setDurable(getBooleanProperty(_nodePropAccess,DURABLE,false));
            node.setAutoDelete(getBooleanProperty(xDeclareMapAccessor,AUTO_DELETE,false));
            node.setExclusive(getBooleanProperty(xDeclareMapAccessor,EXCLUSIVE,false));
            node.setAlternateExchange(xDeclareMapAccessor.getString(ALT_EXCHANGE));
            if (xDeclareMapAccessor.getString(TYPE) != null)
            {
                node.setExchangeType(xDeclareMapAccessor.getString(TYPE));
            }
            node.setBindings(getBindings(_nodePropMap));
            if (!xDeclareMap.isEmpty() && xDeclareMap.containsKey(ARGUMENTS))
            {
                node.setDeclareArgs((Map<String,Object>)xDeclareMap.get(ARGUMENTS));
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

                }
            }
           
            if (((Map) _address.getOptions().get(LINK)).get(CAPACITY) instanceof Map)
            {
                MapAccessor capacityProps = new MapAccessor(
                        (Map) ((Map) _address.getOptions().get(LINK))
                                .get(CAPACITY));
                link
                        .setConsumerCapacity(capacityProps
                                .getInt(CAPACITY_SOURCE) == null ? 0
                                : capacityProps.getInt(CAPACITY_SOURCE));
                link
                        .setProducerCapacity(capacityProps
                                .getInt(CAPACITY_TARGET) == null ? 0
                                : capacityProps.getInt(CAPACITY_TARGET));
            }
            else
            {
                int cap = _linkPropAccess.getInt(CAPACITY) == null ? 0 : _linkPropAccess
                        .getInt(CAPACITY);
                link.setConsumerCapacity(cap);
                link.setProducerCapacity(cap);
            }
            link.setFilter(_linkPropAccess.getString(FILTER));
            // so far filter type not used
           
            Map linkMap = (Map) _address.getOptions().get(LINK);

            if (linkMap != null && linkMap.containsKey(X_SUBSCRIBE))
            {  
                Map x_subscribe = (Map)((Map) _address.getOptions().get(LINK)).get(X_SUBSCRIBE);
               
                if (x_subscribe.containsKey(ARGUMENTS))
                {
                    link.getSubscription().setArgs((Map<String,Object>)x_subscribe.get(ARGUMENTS));
                }
               
                boolean exclusive = x_subscribe.containsKey(EXCLUSIVE) ?
                                    Boolean.parseBoolean((String)x_subscribe.get(EXCLUSIVE)): false;
               
                link.getSubscription().setExclusive(exclusive);
            }

            link.setBindings(getBindings(linkMap));
            Map xDeclareMap = getDeclareArgs(linkMap);
            SubscriptionQueue queue = link.getSubscriptionQueue();
            if (!xDeclareMap.isEmpty() && xDeclareMap.containsKey(ARGUMENTS))
            {
                MapAccessor xDeclareMapAccessor = new MapAccessor(xDeclareMap);
                queue.setAutoDelete(getBooleanProperty(xDeclareMapAccessor,AUTO_DELETE,true));
                queue.setAutoDelete(getBooleanProperty(xDeclareMapAccessor,EXCLUSIVE,true));
                queue.setAlternateExchange(xDeclareMapAccessor.getString(ALT_EXCHANGE));
                queue.setDeclareArgs((Map<String,Object>)xDeclareMap.get(ARGUMENTS));
            }
        }

        return link;
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

    private Accessor linkProps;

    public AddressHelper(Address address)
    {
        this.address = address;
        addressProps = new MapAccessor(address.getOptions());
        Map node_props = address.getOptions() == null
                || address.getOptions().get(NODE) == null ? null
                : (Map) address.getOptions().get(NODE);

        if (node_props != null)
        {
            nodeProps = new MapAccessor(node_props);
        }

        Map link_props = address.getOptions() == null
                || address.getOptions().get(LINK) == null ? null
                : (Map) address.getOptions().get(LINK);

        if (link_props != null)
        {
            linkProps = new MapAccessor(link_props);
        }
    }
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

    }

    private Node createExchangeNode(Map parent)
    {
        Map declareArgs = getDeclareArgs(parent);
        MapAccessor argsMap = new MapAccessor(declareArgs);
        ExchangeNode node = new ExchangeNode();
        node.setExchangeType(argsMap.getString(TYPE) == null ? null : argsMap
                .getString(TYPE));
        fillInCommonNodeArgs(node, parent, argsMap);
        return node;
    }
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

    }

    private Node createQueueNode(Map parent)
    {
        Map declareArgs = getDeclareArgs(parent);
        MapAccessor argsMap = new MapAccessor(declareArgs);
        QueueNode node = new QueueNode();
        node.setAlternateExchange(argsMap.getString(ALT_EXCHANGE));
        node.setExclusive(argsMap.getBoolean(EXCLUSIVE) == null ? false
                : argsMap.getBoolean(EXCLUSIVE));
        fillInCommonNodeArgs(node, parent, argsMap);

        return node;
    }
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

        }
    }
   
    private boolean getDurability(Map map)
    {
        Accessor access = new MapAccessor(map);
        Boolean result = access.getBoolean(DURABLE);
        return (result == null) ? false : result.booleanValue();
    }
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

               
            }
           
            if (((Map) address.getOptions().get(LINK)).get(CAPACITY) instanceof Map)
            {
                MapAccessor capacityProps = new MapAccessor(
                        (Map) ((Map) address.getOptions().get(LINK))
                                .get(CAPACITY));
                link
                        .setConsumerCapacity(capacityProps
                                .getInt(CAPACITY_SOURCE) == null ? 0
                                : capacityProps.getInt(CAPACITY_SOURCE));
                link
                        .setProducerCapacity(capacityProps
                                .getInt(CAPACITY_TARGET) == null ? 0
                                : capacityProps.getInt(CAPACITY_TARGET));
            }
            else
            {
                int cap = linkProps.getInt(CAPACITY) == null ? 0 : linkProps
                        .getInt(CAPACITY);
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

    public AddressHelper(Address address)
    {
        this._address = address;
        this._addressPropMap = address.getOptions();
        this._addressPropAccess = new MapAccessor(_addressPropMap);
        this._nodePropMap = address.getOptions() == null
                || address.getOptions().get(NODE) == null ? null
                : (Map) address.getOptions().get(NODE);

        if (_nodePropMap != null)
        {
            _nodePropAccess = new MapAccessor(_nodePropMap);
        }

        this._linkPropMap = address.getOptions() == null
                || address.getOptions().get(LINK) == null ? null
                : (Map) address.getOptions().get(LINK);

        if (_linkPropMap != null)
        {
            _linkPropAccess = new MapAccessor(_linkPropMap);
        }
    }
View Full Code Here

Examples of org.apache.qpid.configuration.Accessor.MapAccessor

    {
        Node node = new Node(_address.getName());
        if (_nodePropAccess != null)
        {
            Map xDeclareMap = getDeclareArgs(_nodePropMap);
            MapAccessor xDeclareMapAccessor = new MapAccessor(xDeclareMap);

            node.setDurable(getBooleanProperty(_nodePropAccess,DURABLE,false));
            node.setAutoDelete(getBooleanProperty(xDeclareMapAccessor,AUTO_DELETE,false));
            node.setExclusive(getBooleanProperty(xDeclareMapAccessor,EXCLUSIVE,false));
            node.setAlternateExchange(xDeclareMapAccessor.getString(ALT_EXCHANGE));
            if (xDeclareMapAccessor.getString(TYPE) != null)
            {
                node.setExchangeType(xDeclareMapAccessor.getString(TYPE));
            }
            node.setBindings(getBindings(_nodePropMap));
            if (!xDeclareMap.isEmpty() && xDeclareMap.containsKey(ARGUMENTS))
            {
                node.setDeclareArgs((Map<String,Object>)xDeclareMap.get(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.