Package org.apache.qpid.proton.codec.jni

Examples of org.apache.qpid.proton.codec.jni.JNIData


    public ErrorCondition getRemoteCondition()
    {
        SWIGTYPE_p_pn_condition_t cond = Proton.pn_link_remote_condition(_impl);
        _remoteCondition.setCondition(Symbol.valueOf(Proton.pn_condition_get_name(cond)));
        _remoteCondition.setDescription(Proton.pn_condition_get_description(cond));
        JNIData data = new JNIData(Proton.pn_condition_info(cond));
        if(data.next() == Data.DataType.MAP)
        {
            _remoteCondition.setInfo(data.getJavaMap());
        }
        return _remoteCondition;
    }
View Full Code Here


        {
            Proton.pn_condition_set_name(cond, _condition.getCondition().toString());
            Proton.pn_condition_set_description(cond, _condition.getDescription());
            if(_condition.getInfo() != null && !_condition.getInfo().isEmpty())
            {
                JNIData data = new JNIData(Proton.pn_condition_info(cond));
                data.putJavaMap(_condition.getInfo());
            }
        }

        Proton.pn_link_close(_impl);
    }
View Full Code Here

    public ErrorCondition getRemoteCondition()
    {
        SWIGTYPE_p_pn_condition_t cond = Proton.pn_link_remote_condition(_impl);
        _remoteCondition.setCondition(Symbol.valueOf(Proton.pn_condition_get_name(cond)));
        _remoteCondition.setDescription(Proton.pn_condition_get_description(cond));
        JNIData data = new JNIData(Proton.pn_condition_info(cond));
        if(data.next() == Data.DataType.MAP)
        {
            _remoteCondition.setInfo(data.getJavaMap());
        }
        return _remoteCondition;
    }
View Full Code Here

        {
            Proton.pn_condition_set_name(cond, _condition.getCondition().toString());
            Proton.pn_condition_set_description(cond, _condition.getDescription());
            if(_condition.getInfo() != null && !_condition.getInfo().isEmpty())
            {
                JNIData data = new JNIData(Proton.pn_condition_info(cond));
                data.putJavaMap(_condition.getInfo());
            }
        }

        Proton.pn_link_close(_impl);
    }
View Full Code Here

        _header.setDeliveryCount(UnsignedInteger.valueOf(Proton.pn_message_get_delivery_count(_impl)));
    }

    private void decodeDeliveryAnnotations()
    {
        JNIData data = new JNIData(Proton.pn_message_instructions(_impl));
        if(data.next() == DataType.MAP)
        {
            Map map = data.getJavaMap();
            _deliveryAnnotations = new DeliveryAnnotations(map);
        }
        else
        {
            _deliveryAnnotations = null;
View Full Code Here

        }
    }

    private void decodeMessageAnnotations()
    {
        JNIData data = new JNIData(Proton.pn_message_annotations(_impl));
        if(data.next() == DataType.MAP)
        {
            Map map = data.getJavaMap();
            _messageAnnotations = new MessageAnnotations(map);
        }
        else
        {
            _messageAnnotations = null;
View Full Code Here

        _properties.setReplyToGroupId(Proton.pn_message_get_reply_to_group_id(_impl));
    }

    private void decodeApplicationProperies()
    {
        JNIData data = new JNIData(Proton.pn_message_properties(_impl));
        if(data.next() == DataType.MAP)
        {
            Map map = data.getJavaMap();
            _applicationProperties = new ApplicationProperties(map);
        }
        else
        {
            _applicationProperties = null;
View Full Code Here

    }

    private void decodeBody()
    {
        SWIGTYPE_p_pn_data_t body = Proton.pn_message_body(_impl);
        JNIData data = new JNIData(body);
        data.rewind();

        org.apache.qpid.proton.codec.Data.DataType dataType = data.next();
        Section section;
        if(dataType == null)
        {
            section = null;
        }
        else
        {
            Object obj = data.getObject();
            boolean notAmqpValue = Proton.pn_message_is_inferred(_impl);

            if(notAmqpValue && dataType == DataType.BINARY)
            {
                section = new Data((Binary)obj);
View Full Code Here

        Proton.pn_message_set_delivery_count(_impl, deliveryCount);
    }

    private void encodeDeliveryAnnotations()
    {
        JNIData data = new JNIData(Proton.pn_message_instructions(_impl));
        data.clear();
        Map annotations;
        if(_deliveryAnnotations != null
           && (annotations = _deliveryAnnotations.getValue()) != null
           && !annotations.isEmpty())
        {
            data.putJavaMap(annotations);
        }
    }
View Full Code Here

        }
    }

    private void encodeMessageAnnotations()
    {
        JNIData data = new JNIData(Proton.pn_message_annotations(_impl));
        data.clear();
        Map annotations;
        if(_messageAnnotations != null
           && (annotations = _messageAnnotations.getValue()) != null
           && !annotations.isEmpty())
        {
            data.putJavaMap(annotations);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.proton.codec.jni.JNIData

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.