Search in sources :

Example 6 with PropertiesSection

use of org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection in project qpid-broker-j by apache.

the class MessageConverter_from_1_0 method getUserId.

public static Binary getUserId(final Message_1_0 serverMsg) {
    Binary userId = null;
    final PropertiesSection propertiesSection = serverMsg.getPropertiesSection();
    if (propertiesSection != null) {
        final Properties properties = propertiesSection.getValue();
        propertiesSection.dispose();
        if (properties != null) {
            userId = properties.getUserId();
        }
    }
    return userId;
}
Also used : PropertiesSection(org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection) Binary(org.apache.qpid.server.protocol.v1_0.type.Binary) Properties(org.apache.qpid.server.protocol.v1_0.type.messaging.Properties)

Example 7 with PropertiesSection

use of org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection in project qpid-broker-j by apache.

the class MessageConverter_from_1_0 method getContentEncoding.

static Symbol getContentEncoding(final Message_1_0 serverMsg) {
    Symbol contentEncoding = null;
    final PropertiesSection propertiesSection = serverMsg.getPropertiesSection();
    if (propertiesSection != null) {
        final Properties properties = propertiesSection.getValue();
        propertiesSection.dispose();
        if (properties != null) {
            contentEncoding = properties.getContentEncoding();
        }
    }
    return contentEncoding;
}
Also used : PropertiesSection(org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection) Symbol(org.apache.qpid.server.protocol.v1_0.type.Symbol) Properties(org.apache.qpid.server.protocol.v1_0.type.messaging.Properties)

Example 8 with PropertiesSection

use of org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection in project qpid-broker-j by apache.

the class MessageConverter_from_1_0 method getCorrelationId.

public static Object getCorrelationId(final Message_1_0 serverMsg) {
    Object correlationIdObject = null;
    final PropertiesSection propertiesSection = serverMsg.getPropertiesSection();
    if (propertiesSection != null) {
        final Properties properties = propertiesSection.getValue();
        propertiesSection.dispose();
        if (properties != null) {
            correlationIdObject = properties.getCorrelationId();
        }
    }
    return correlationIdObject;
}
Also used : PropertiesSection(org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection) Properties(org.apache.qpid.server.protocol.v1_0.type.messaging.Properties)

Example 9 with PropertiesSection

use of org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection in project qpid-broker-j by apache.

the class MessageConverter_from_1_0 method getCreationTime.

public static Date getCreationTime(final Message_1_0 serverMsg) {
    final PropertiesSection propertiesSection = serverMsg.getPropertiesSection();
    if (propertiesSection != null) {
        final Properties properties = propertiesSection.getValue();
        propertiesSection.dispose();
        if (properties != null) {
            return properties.getCreationTime();
        }
    }
    return null;
}
Also used : PropertiesSection(org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection) Properties(org.apache.qpid.server.protocol.v1_0.type.messaging.Properties)

Example 10 with PropertiesSection

use of org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection in project qpid-broker-j by apache.

the class MessageConverter_from_1_0 method getReplyTo.

public static String getReplyTo(final Message_1_0 serverMsg) {
    String replyTo = null;
    final PropertiesSection propertiesSection = serverMsg.getPropertiesSection();
    if (propertiesSection != null) {
        final Properties properties = propertiesSection.getValue();
        propertiesSection.dispose();
        if (properties != null) {
            replyTo = properties.getReplyTo();
        }
    }
    return replyTo;
}
Also used : PropertiesSection(org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection) Properties(org.apache.qpid.server.protocol.v1_0.type.messaging.Properties)

Aggregations

PropertiesSection (org.apache.qpid.server.protocol.v1_0.type.messaging.PropertiesSection)12 Properties (org.apache.qpid.server.protocol.v1_0.type.messaging.Properties)10 AmqpSequenceSection (org.apache.qpid.server.protocol.v1_0.type.messaging.AmqpSequenceSection)2 AmqpValueSection (org.apache.qpid.server.protocol.v1_0.type.messaging.AmqpValueSection)2 ApplicationPropertiesSection (org.apache.qpid.server.protocol.v1_0.type.messaging.ApplicationPropertiesSection)2 DataSection (org.apache.qpid.server.protocol.v1_0.type.messaging.DataSection)2 DeliveryAnnotationsSection (org.apache.qpid.server.protocol.v1_0.type.messaging.DeliveryAnnotationsSection)2 EncodingRetainingSection (org.apache.qpid.server.protocol.v1_0.type.messaging.EncodingRetainingSection)2 FooterSection (org.apache.qpid.server.protocol.v1_0.type.messaging.FooterSection)2 HeaderSection (org.apache.qpid.server.protocol.v1_0.type.messaging.HeaderSection)2 MessageAnnotationsSection (org.apache.qpid.server.protocol.v1_0.type.messaging.MessageAnnotationsSection)2 QpidByteBuffer (org.apache.qpid.server.bytebuffer.QpidByteBuffer)1 Binary (org.apache.qpid.server.protocol.v1_0.type.Binary)1 Symbol (org.apache.qpid.server.protocol.v1_0.type.Symbol)1 ConnectionScopedRuntimeException (org.apache.qpid.server.util.ConnectionScopedRuntimeException)1