javax.jms.Message.setJMSRedelivered()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(12.9k)|赞(0)|评价(0)|浏览(189)

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

Message.setJMSRedelivered介绍

[英]Specifies whether this message is being redelivered.

This method is for use by JMS providers only to set this field when a message is delivered. This message cannot be used by clients to configure the redelivered status of the message. This method is public to allow a JMS provider to set this field when sending a message whose implementation is not its own.
[中]指定是否重新传递此邮件。
此方法仅用于JMS提供程序在传递消息时设置此字段。客户端无法使用此消息配置消息的重新传递状态。此方法是公共的,允许JMS提供程序在发送非其自身实现的消息时设置此字段。

代码示例

代码示例来源:origin: apache/nifi

message.setJMSPriority(Integer.parseInt(entry.getValue()));
} else if (entry.getKey().equals(JmsHeaders.REDELIVERED)) {
  message.setJMSRedelivered(Boolean.parseBoolean(entry.getValue()));
} else if (entry.getKey().equals(JmsHeaders.TIMESTAMP)) {
  message.setJMSTimestamp(Long.parseLong(entry.getValue()));

代码示例来源:origin: apache/activemq

/**
   * Copies the standard JMS and user defined properties from the givem
   * message to the specified message
   *
   * @param fromMessage the message to take the properties from
   * @param toMessage the message to add the properties to
   * @throws JMSException
   */
  public static void copyProperties(Message fromMessage, Message toMessage) throws JMSException {
    toMessage.setJMSMessageID(fromMessage.getJMSMessageID());
    toMessage.setJMSCorrelationID(fromMessage.getJMSCorrelationID());
    toMessage.setJMSReplyTo(transformDestination(fromMessage.getJMSReplyTo()));
    toMessage.setJMSDestination(transformDestination(fromMessage.getJMSDestination()));
    toMessage.setJMSDeliveryMode(fromMessage.getJMSDeliveryMode());
    toMessage.setJMSRedelivered(fromMessage.getJMSRedelivered());
    toMessage.setJMSType(fromMessage.getJMSType());
    toMessage.setJMSExpiration(fromMessage.getJMSExpiration());
    toMessage.setJMSPriority(fromMessage.getJMSPriority());
    toMessage.setJMSTimestamp(fromMessage.getJMSTimestamp());

    Enumeration propertyNames = fromMessage.getPropertyNames();

    while (propertyNames.hasMoreElements()) {
      String name = propertyNames.nextElement().toString();
      Object obj = fromMessage.getObjectProperty(name);
      toMessage.setObjectProperty(name, obj);
    }
  }
}

代码示例来源:origin: apache/activemq

message.setJMSRedelivered(false);

代码示例来源:origin: org.jboss.jbossas/jboss-as-connector

public void setJMSRedelivered(boolean redelivered) throws JMSException
{
 message.setJMSRedelivered(redelivered);
}

代码示例来源:origin: org.apache.tomee/openejb-core

@Override
public void setJMSRedelivered(final boolean redelivered) throws JMSException {
  message.setJMSRedelivered(redelivered);
}

代码示例来源:origin: org.jboss.genericjms/generic-jms-ra-jar

public void setJMSRedelivered(boolean redelivered) throws JMSException {
  message.setJMSRedelivered(redelivered);
}

代码示例来源:origin: org.apache.qpid/qpid-jca

/**
* Set redelivered status
* @param redelivered The value
* @exception JMSException Thrown if an error occurs
*/
public void setJMSRedelivered(final boolean redelivered) throws JMSException
{
 if (_log.isTraceEnabled())
 {
   _log.trace("setJMSRedelivered(" + redelivered + ")");
 }
 _message.setJMSRedelivered(redelivered);
}

代码示例来源:origin: org.apache.activemq/artemis-ra

/**
* Set redelivered status
*
* @param redelivered The value
* @throws JMSException Thrown if an error occurs
*/
@Override
public void setJMSRedelivered(final boolean redelivered) throws JMSException {
 if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
   ActiveMQRALogger.LOGGER.trace("setJMSRedelivered(" + redelivered + ")");
 }
 message.setJMSRedelivered(redelivered);
}

代码示例来源:origin: apache/activemq-artemis

/**
* Set redelivered status
*
* @param redelivered The value
* @throws JMSException Thrown if an error occurs
*/
@Override
public void setJMSRedelivered(final boolean redelivered) throws JMSException {
 if (ActiveMQRALogger.LOGGER.isTraceEnabled()) {
   ActiveMQRALogger.LOGGER.trace("setJMSRedelivered(" + redelivered + ")");
 }
 message.setJMSRedelivered(redelivered);
}

代码示例来源:origin: org.apache.nifi/nifi-jms-processors

message.setJMSPriority(Integer.parseInt(entry.getValue()));
} else if (entry.getKey().equals(JmsHeaders.REDELIVERED)) {
  message.setJMSRedelivered(Boolean.parseBoolean(entry.getValue()));
} else if (entry.getKey().equals(JmsHeaders.TIMESTAMP)) {
  message.setJMSTimestamp(Long.parseLong(entry.getValue()));

代码示例来源:origin: jboss-switchyard/components

message.setJMSType(value.toString());
} else if (name.equals(HEADER_JMS_REDELIVERED)) {
  message.setJMSRedelivered(Boolean.parseBoolean(value.toString()));

代码示例来源:origin: com.github.fridujo/spring-automocker

public Message toMessage(Session session) throws JMSException {
  Message message = toMessageInternal(session);
  if (messageId != null)
    message.setJMSMessageID(messageId);
  if (timestamp != null)
    message.setJMSTimestamp(timestamp);
  if (correlationId != null)
    message.setJMSCorrelationID(correlationId);
  if (replyTo != null)
    message.setJMSReplyTo(session.createQueue(replyTo));
  if (deliveryMode != null)
    message.setJMSDeliveryMode(deliveryMode);
  if (redelivered != null)
    message.setJMSRedelivered(redelivered);
  if (type != null)
    message.setJMSType(type);
  if (expiration != null)
    message.setJMSExpiration(expiration);
  if (priority != null)
    message.setJMSPriority(priority);
  properties.entrySet()
    .forEach(ThrowingConsumer.silent(e -> message.setObjectProperty(e.getKey(), e.getValue())));
  return message;
}

代码示例来源:origin: org.apache.activemq/activemq-client

/**
   * Copies the standard JMS and user defined properties from the givem
   * message to the specified message
   *
   * @param fromMessage the message to take the properties from
   * @param toMessage the message to add the properties to
   * @throws JMSException
   */
  public static void copyProperties(Message fromMessage, Message toMessage) throws JMSException {
    toMessage.setJMSMessageID(fromMessage.getJMSMessageID());
    toMessage.setJMSCorrelationID(fromMessage.getJMSCorrelationID());
    toMessage.setJMSReplyTo(transformDestination(fromMessage.getJMSReplyTo()));
    toMessage.setJMSDestination(transformDestination(fromMessage.getJMSDestination()));
    toMessage.setJMSDeliveryMode(fromMessage.getJMSDeliveryMode());
    toMessage.setJMSRedelivered(fromMessage.getJMSRedelivered());
    toMessage.setJMSType(fromMessage.getJMSType());
    toMessage.setJMSExpiration(fromMessage.getJMSExpiration());
    toMessage.setJMSPriority(fromMessage.getJMSPriority());
    toMessage.setJMSTimestamp(fromMessage.getJMSTimestamp());

    Enumeration propertyNames = fromMessage.getPropertyNames();

    while (propertyNames.hasMoreElements()) {
      String name = propertyNames.nextElement().toString();
      Object obj = fromMessage.getObjectProperty(name);
      toMessage.setObjectProperty(name, obj);
    }
  }
}

代码示例来源:origin: org.fusesource.stompjms/stompjms-client

/**
   * Copies the standard JMS and user defined properties from the givem
   * message to the specified message
   *
   * @param fromMessage the message to take the properties from
   * @param toMessage   the message to add the properties to
   * @throws JMSException
   */
  public static void copyProperties(StompJmsConnection connection, Message fromMessage, Message toMessage) throws JMSException {
    toMessage.setJMSMessageID(fromMessage.getJMSMessageID());
    toMessage.setJMSCorrelationID(fromMessage.getJMSCorrelationID());
    toMessage.setJMSReplyTo(transformDestination(connection, fromMessage.getJMSReplyTo()));
    toMessage.setJMSDestination(transformDestination(connection, fromMessage.getJMSDestination()));
    toMessage.setJMSDeliveryMode(fromMessage.getJMSDeliveryMode());
    toMessage.setJMSRedelivered(fromMessage.getJMSRedelivered());
    toMessage.setJMSType(fromMessage.getJMSType());
    toMessage.setJMSExpiration(fromMessage.getJMSExpiration());
    toMessage.setJMSPriority(fromMessage.getJMSPriority());
    toMessage.setJMSTimestamp(fromMessage.getJMSTimestamp());

    Enumeration propertyNames = fromMessage.getPropertyNames();

    while (propertyNames.hasMoreElements()) {
      String name = propertyNames.nextElement().toString();
      Object obj = fromMessage.getObjectProperty(name);
      toMessage.setObjectProperty(name, obj);
    }
  }
}

代码示例来源:origin: org.apache.activemq/activemq-all

/**
   * Copies the standard JMS and user defined properties from the givem
   * message to the specified message
   *
   * @param fromMessage the message to take the properties from
   * @param toMessage the message to add the properties to
   * @throws JMSException
   */
  public static void copyProperties(Message fromMessage, Message toMessage) throws JMSException {
    toMessage.setJMSMessageID(fromMessage.getJMSMessageID());
    toMessage.setJMSCorrelationID(fromMessage.getJMSCorrelationID());
    toMessage.setJMSReplyTo(transformDestination(fromMessage.getJMSReplyTo()));
    toMessage.setJMSDestination(transformDestination(fromMessage.getJMSDestination()));
    toMessage.setJMSDeliveryMode(fromMessage.getJMSDeliveryMode());
    toMessage.setJMSRedelivered(fromMessage.getJMSRedelivered());
    toMessage.setJMSType(fromMessage.getJMSType());
    toMessage.setJMSExpiration(fromMessage.getJMSExpiration());
    toMessage.setJMSPriority(fromMessage.getJMSPriority());
    toMessage.setJMSTimestamp(fromMessage.getJMSTimestamp());

    Enumeration propertyNames = fromMessage.getPropertyNames();

    while (propertyNames.hasMoreElements()) {
      String name = propertyNames.nextElement().toString();
      Object obj = fromMessage.getObjectProperty(name);
      toMessage.setObjectProperty(name, obj);
    }
  }
}

代码示例来源:origin: fusesource/stompjms

/**
   * Copies the standard JMS and user defined properties from the givem
   * message to the specified message
   *
   * @param fromMessage the message to take the properties from
   * @param toMessage   the message to add the properties to
   * @throws JMSException
   */
  public static void copyProperties(StompJmsConnection connection, Message fromMessage, Message toMessage) throws JMSException {
    toMessage.setJMSMessageID(fromMessage.getJMSMessageID());
    toMessage.setJMSCorrelationID(fromMessage.getJMSCorrelationID());
    toMessage.setJMSReplyTo(transformDestination(connection, fromMessage.getJMSReplyTo()));
    toMessage.setJMSDestination(transformDestination(connection, fromMessage.getJMSDestination()));
    toMessage.setJMSDeliveryMode(fromMessage.getJMSDeliveryMode());
    toMessage.setJMSRedelivered(fromMessage.getJMSRedelivered());
    toMessage.setJMSType(fromMessage.getJMSType());
    toMessage.setJMSExpiration(fromMessage.getJMSExpiration());
    toMessage.setJMSPriority(fromMessage.getJMSPriority());
    toMessage.setJMSTimestamp(fromMessage.getJMSTimestamp());

    Enumeration propertyNames = fromMessage.getPropertyNames();

    while (propertyNames.hasMoreElements()) {
      String name = propertyNames.nextElement().toString();
      Object obj = fromMessage.getObjectProperty(name);
      toMessage.setObjectProperty(name, obj);
    }
  }
}

代码示例来源:origin: org.apache.activemq/activemq-osgi

/**
   * Copies the standard JMS and user defined properties from the givem
   * message to the specified message
   *
   * @param fromMessage the message to take the properties from
   * @param toMessage the message to add the properties to
   * @throws JMSException
   */
  public static void copyProperties(Message fromMessage, Message toMessage) throws JMSException {
    toMessage.setJMSMessageID(fromMessage.getJMSMessageID());
    toMessage.setJMSCorrelationID(fromMessage.getJMSCorrelationID());
    toMessage.setJMSReplyTo(transformDestination(fromMessage.getJMSReplyTo()));
    toMessage.setJMSDestination(transformDestination(fromMessage.getJMSDestination()));
    toMessage.setJMSDeliveryMode(fromMessage.getJMSDeliveryMode());
    toMessage.setJMSRedelivered(fromMessage.getJMSRedelivered());
    toMessage.setJMSType(fromMessage.getJMSType());
    toMessage.setJMSExpiration(fromMessage.getJMSExpiration());
    toMessage.setJMSPriority(fromMessage.getJMSPriority());
    toMessage.setJMSTimestamp(fromMessage.getJMSTimestamp());

    Enumeration propertyNames = fromMessage.getPropertyNames();

    while (propertyNames.hasMoreElements()) {
      String name = propertyNames.nextElement().toString();
      Object obj = fromMessage.getObjectProperty(name);
      toMessage.setObjectProperty(name, obj);
    }
  }
}

代码示例来源:origin: pierre/meteo

/**
   * Copies the standard JMS and user defined properties from the givem
   * message to the specified message
   * 
   * @param fromMessage the message to take the properties from
   * @param toMessage the message to add the properties to
   * @throws JMSException
   */
  public static void copyProperties(Message fromMessage, Message toMessage) throws JMSException {
    toMessage.setJMSMessageID(fromMessage.getJMSMessageID());
    toMessage.setJMSCorrelationID(fromMessage.getJMSCorrelationID());
    toMessage.setJMSReplyTo(transformDestination(fromMessage.getJMSReplyTo()));
    toMessage.setJMSDestination(transformDestination(fromMessage.getJMSDestination()));
    toMessage.setJMSDeliveryMode(fromMessage.getJMSDeliveryMode());
    toMessage.setJMSRedelivered(fromMessage.getJMSRedelivered());
    toMessage.setJMSType(fromMessage.getJMSType());
    toMessage.setJMSExpiration(fromMessage.getJMSExpiration());
    toMessage.setJMSPriority(fromMessage.getJMSPriority());
    toMessage.setJMSTimestamp(fromMessage.getJMSTimestamp());

    Enumeration propertyNames = fromMessage.getPropertyNames();

    while (propertyNames.hasMoreElements()) {
      String name = propertyNames.nextElement().toString();
      Object obj = fromMessage.getObjectProperty(name);
      toMessage.setObjectProperty(name, obj);
    }
  }
}

代码示例来源:origin: com.github.jbricks.soap2jms/s2j_common

message.setJMSExpiration(wsMessage.getJmsExpiration());
message.setJMSPriority(wsMessage.getJmsPriority());
message.setJMSRedelivered(wsMessage.isJmsRedelivered());
message.setJMSTimestamp(wsMessage.getJmsTimestamp());
message.setJMSType(wsMessage.getJmsType());

代码示例来源:origin: timewalker74/ffmq

dstMessage.setJMSMessageID(srcMessage.getJMSMessageID());
dstMessage.setJMSPriority(srcMessage.getJMSPriority());
dstMessage.setJMSRedelivered(srcMessage.getJMSRedelivered());

相关文章