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


    }

    private void encodeApplicationProperies()
    {
        JNIData data = new JNIData(Proton.pn_message_properties(_impl));
        data.clear();
        Map appProperties;
        if(_applicationProperties != null
           && (appProperties = _applicationProperties.getValue()) != null
           && !appProperties.isEmpty())
        {
            data.putJavaMap(appProperties);
        }
    }
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_connection_close(_impl);
    }
View Full Code Here

        }
    }

    private void encodeBody()
    {
        JNIData data = new JNIData(Proton.pn_message_body(_impl));
        data.clear();
        if(_body instanceof Data)
        {
            Proton.pn_message_set_inferred(_impl, true);
            data.putBinary(((Data) _body).getValue());
        }
        else if(_body instanceof AmqpSequence)
        {
            Proton.pn_message_set_inferred(_impl, true);
            data.putJavaList(((AmqpSequence)_body).getValue());
        }
        else if(_body instanceof AmqpValue)
        {
            Proton.pn_message_set_inferred(_impl, false);
            data.putObject(((AmqpValue) _body).getValue());
        }
    }
View Full Code Here

    @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

    @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

    @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

    @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

    public ErrorCondition getRemoteCondition()
    {
        SWIGTYPE_p_pn_condition_t cond = Proton.pn_session_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_session_close(_impl);
    }
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.