Examples of JNIData


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

    @Override
    @ProtonCEquivalent("pn_connection_offered_capabilities")
    public void setOfferedCapabilities(Symbol[] capabilities)
    {
        JNIData data = new JNIData(Proton.pn_connection_offered_capabilities(_impl));
        data.clear();
        if(capabilities != null)
        {
            data.putJavaArray(capabilities);
        }
    }
View Full Code Here

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

    @Override
    @ProtonCEquivalent("pn_connection_desired_capabilities")
    public void setDesiredCapabilities(Symbol[] capabilities)
    {
        JNIData data = new JNIData(Proton.pn_connection_desired_capabilities(_impl));
        data.clear();
        if(capabilities != null)
        {
            data.putJavaArray(capabilities);
        }
    }
View Full Code Here

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

    @Override
    @ProtonCEquivalent("pn_connection_remote_offered_capabilities")
    public Symbol[] getRemoteOfferedCapabilities()
    {
        JNIData data = new JNIData(Proton.pn_connection_remote_offered_capabilities(_impl));
        data.rewind();
        if(data.next() != null)
        {
            return (Symbol[]) data.getJavaArray();
        }
        return EMPTY_CAPABILTIES;
    }
View Full Code Here

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

    @Override
    @ProtonCEquivalent("pn_connection_remote_desired_capabilities")
    public Symbol[] getRemoteDesiredCapabilities()
    {
        JNIData data = new JNIData(Proton.pn_connection_remote_desired_capabilities(_impl));
        data.rewind();
        if(data.next() != null)
        {
            return (Symbol[]) data.getJavaArray();
        }
        return EMPTY_CAPABILTIES;
    }
View Full Code Here

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

        _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

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

        }
    }

    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

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

        _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

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

    }

    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

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

        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

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

        }
    }

    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
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.