org.apache.qpid.proton.message.Message.getContentEncoding()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(157)

本文整理了Java中org.apache.qpid.proton.message.Message.getContentEncoding()方法的一些代码示例,展示了Message.getContentEncoding()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getContentEncoding()方法的具体详情如下:
包路径:org.apache.qpid.proton.message.Message
类名称:Message
方法名:getContentEncoding

Message.getContentEncoding介绍

暂无

代码示例

代码示例来源:origin: eclipse/hono

if (Strings.isNullOrEmpty(message.getContentEncoding()) && String.class.isInstance(prop.getValue())) {
  message.setContentEncoding((String) prop.getValue());

代码示例来源:origin: org.eclipse.hono/hono-service-base

if (Strings.isNullOrEmpty(message.getContentEncoding()) && String.class.isInstance(prop.getValue())) {
  message.setContentEncoding((String) prop.getValue());

代码示例来源:origin: org.eclipse.hono/hono-core

/**
 * Adds JMS vendor properties defined by
 * <a href="https://www.oasis-open.org/committees/download.php/60574/amqp-bindmap-jms-v1.0-wd09.pdf"> AMQP JMS
 * Mapping 1.0</a> as AMQP 1.0 application properties to a given message.
 * <p>
 * The following vendor properties are added (if the message has a corresponding non-null value set):
 * <ul>
 * <li>{@link #JMS_VENDOR_PROPERTY_CONTENT_TYPE}</li>
 * <li>{@link #JMS_VENDOR_PROPERTY_CONTENT_ENCODING}</li>
 * </ul>
 *
 * @param msg the message to add the vendor properties to.
 */
public static void addJmsVendorProperties(final Message msg) {
  if (!Strings.isNullOrEmpty(msg.getContentType())) {
    MessageHelper.addProperty(msg, JMS_VENDOR_PROPERTY_CONTENT_TYPE, msg.getContentType());
  }
  if (!Strings.isNullOrEmpty(msg.getContentEncoding())) {
    MessageHelper.addProperty(msg, JMS_VENDOR_PROPERTY_CONTENT_ENCODING, msg.getContentEncoding());
  }
}

代码示例来源:origin: eclipse/hono

/**
 * Adds JMS vendor properties defined by
 * <a href="https://www.oasis-open.org/committees/download.php/60574/amqp-bindmap-jms-v1.0-wd09.pdf"> AMQP JMS
 * Mapping 1.0</a> as AMQP 1.0 application properties to a given message.
 * <p>
 * The following vendor properties are added (if the message has a corresponding non-null value set):
 * <ul>
 * <li>{@link #JMS_VENDOR_PROPERTY_CONTENT_TYPE}</li>
 * <li>{@link #JMS_VENDOR_PROPERTY_CONTENT_ENCODING}</li>
 * </ul>
 *
 * @param msg the message to add the vendor properties to.
 */
public static void addJmsVendorProperties(final Message msg) {
  if (!Strings.isNullOrEmpty(msg.getContentType())) {
    MessageHelper.addProperty(msg, JMS_VENDOR_PROPERTY_CONTENT_TYPE, msg.getContentType());
  }
  if (!Strings.isNullOrEmpty(msg.getContentEncoding())) {
    MessageHelper.addProperty(msg, JMS_VENDOR_PROPERTY_CONTENT_ENCODING, msg.getContentEncoding());
  }
}

代码示例来源:origin: Azure/azure-event-hubs-java

if (amqpMessage.getContentType() != null)
  receiveProperties.put(AmqpConstants.AMQP_PROPERTY_CONTENT_TYPE, amqpMessage.getContentType());
if (amqpMessage.getContentEncoding() != null)
  receiveProperties.put(AmqpConstants.AMQP_PROPERTY_CONTENT_ENCODING, amqpMessage.getContentEncoding());
if (amqpMessage.getProperties().getAbsoluteExpiryTime() != null)
  receiveProperties.put(AmqpConstants.AMQP_PROPERTY_ABSOLUTE_EXPRITY_TIME, amqpMessage.getExpiryTime());

相关文章