org.apache.activemq.artemis.api.core.Message.getTimestamp()方法的使用及代码示例

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

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

Message.getTimestamp介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

  1. /**
  2. * @return Returns the message in Map form, useful when encoding to JSON
  3. */
  4. default Map<String, Object> toMap() {
  5. Map map = toPropertyMap();
  6. map.put("messageID", getMessageID());
  7. Object userID = getUserID();
  8. if (getUserID() != null) {
  9. map.put("userID", "ID:" + userID.toString());
  10. }
  11. map.put("address", getAddress() == null ? "" : getAddress());
  12. map.put("durable", isDurable());
  13. map.put("expiration", getExpiration());
  14. map.put("timestamp", getTimestamp());
  15. map.put("priority", (int)getPriority());
  16. return map;
  17. }

代码示例来源:origin: wildfly/wildfly

  1. @Override
  2. public void copyHeadersAndProperties(final Message msg) {
  3. messageID = msg.getMessageID();
  4. address = msg.getAddressSimpleString();
  5. userID = (UUID) msg.getUserID();
  6. type = msg.toCore().getType();
  7. durable = msg.isDurable();
  8. expiration = msg.getExpiration();
  9. timestamp = msg.getTimestamp();
  10. priority = msg.getPriority();
  11. if (msg instanceof CoreMessage) {
  12. properties = ((CoreMessage) msg).getTypedProperties();
  13. }
  14. }

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

  1. /**
  2. * @return Returns the message in Map form, useful when encoding to JSON
  3. */
  4. default Map<String, Object> toMap() {
  5. Map map = toPropertyMap();
  6. map.put("messageID", getMessageID());
  7. Object userID = getUserID();
  8. if (getUserID() != null) {
  9. map.put("userID", "ID:" + userID.toString());
  10. }
  11. map.put("address", getAddress() == null ? "" : getAddress());
  12. map.put("durable", isDurable());
  13. map.put("expiration", getExpiration());
  14. map.put("timestamp", getTimestamp());
  15. map.put("priority", (int)getPriority());
  16. return map;
  17. }

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

  1. /**
  2. * @return Returns the message in Map form, useful when encoding to JSON
  3. */
  4. default Map<String, Object> toMap() {
  5. Map map = toPropertyMap();
  6. map.put("messageID", getMessageID());
  7. Object userID = getUserID();
  8. if (getUserID() != null) {
  9. map.put("userID", "ID:" + userID.toString());
  10. }
  11. map.put("address", getAddress() == null ? "" : getAddress());
  12. map.put("durable", isDurable());
  13. map.put("expiration", getExpiration());
  14. map.put("timestamp", getTimestamp());
  15. map.put("priority", (int)getPriority());
  16. return map;
  17. }

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

  1. /**
  2. * @return Returns the message in Map form, useful when encoding to JSON
  3. */
  4. default Map<String, Object> toMap() {
  5. Map map = toPropertyMap();
  6. map.put("messageID", getMessageID());
  7. Object userID = getUserID();
  8. if (getUserID() != null) {
  9. map.put("userID", "ID:" + userID.toString());
  10. }
  11. map.put("address", getAddress() == null ? "" : getAddress());
  12. map.put("durable", isDurable());
  13. map.put("expiration", getExpiration());
  14. map.put("timestamp", getTimestamp());
  15. map.put("priority", (int)getPriority());
  16. return map;
  17. }

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

  1. /**
  2. * @return Returns the message in Map form, useful when encoding to JSON
  3. */
  4. default Map<String, Object> toMap() {
  5. Map map = toPropertyMap();
  6. map.put("messageID", getMessageID());
  7. Object userID = getUserID();
  8. if (getUserID() != null) {
  9. map.put("userID", "ID:" + userID.toString());
  10. }
  11. map.put("address", getAddress() == null ? "" : getAddress());
  12. map.put("durable", isDurable());
  13. map.put("expiration", getExpiration());
  14. map.put("timestamp", getTimestamp());
  15. map.put("priority", (int)getPriority());
  16. return map;
  17. }

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

  1. /**
  2. * @return Returns the message in Map form, useful when encoding to JSON
  3. */
  4. default Map<String, Object> toMap() {
  5. Map map = toPropertyMap();
  6. map.put("messageID", getMessageID());
  7. Object userID = getUserID();
  8. if (getUserID() != null) {
  9. map.put("userID", "ID:" + userID.toString());
  10. }
  11. map.put("address", getAddress() == null ? "" : getAddress());
  12. map.put("durable", isDurable());
  13. map.put("expiration", getExpiration());
  14. map.put("timestamp", getTimestamp());
  15. map.put("priority", (int)getPriority());
  16. return map;
  17. }

代码示例来源:origin: org.jboss.eap/wildfly-client-all

  1. /**
  2. * @return Returns the message in Map form, useful when encoding to JSON
  3. */
  4. default Map<String, Object> toMap() {
  5. Map map = toPropertyMap();
  6. map.put("messageID", getMessageID());
  7. Object userID = getUserID();
  8. if (getUserID() != null) {
  9. map.put("userID", "ID:" + userID.toString());
  10. }
  11. map.put("address", getAddress() == null ? "" : getAddress());
  12. map.put("durable", isDurable());
  13. map.put("expiration", getExpiration());
  14. map.put("timestamp", getTimestamp());
  15. map.put("priority", (int)getPriority());
  16. return map;
  17. }

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

  1. @Override
  2. public void copyHeadersAndProperties(final Message msg) {
  3. messageID = msg.getMessageID();
  4. address = msg.getAddressSimpleString();
  5. userID = (UUID) msg.getUserID();
  6. type = msg.toCore().getType();
  7. durable = msg.isDurable();
  8. expiration = msg.getExpiration();
  9. timestamp = msg.getTimestamp();
  10. priority = msg.getPriority();
  11. if (msg instanceof CoreMessage) {
  12. properties = ((CoreMessage) msg).getProperties();
  13. }
  14. }

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

  1. @Override
  2. public void copyHeadersAndProperties(final Message msg) {
  3. messageID = msg.getMessageID();
  4. address = msg.getAddressSimpleString();
  5. userID = (UUID) msg.getUserID();
  6. type = msg.toCore().getType();
  7. durable = msg.isDurable();
  8. expiration = msg.getExpiration();
  9. timestamp = msg.getTimestamp();
  10. priority = msg.getPriority();
  11. if (msg instanceof CoreMessage) {
  12. properties = ((CoreMessage) msg).getProperties();
  13. }
  14. }

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

  1. @Override
  2. public void copyHeadersAndProperties(final Message msg) {
  3. messageID = msg.getMessageID();
  4. address = msg.getAddressSimpleString();
  5. userID = (UUID) msg.getUserID();
  6. type = msg.toCore().getType();
  7. durable = msg.isDurable();
  8. expiration = msg.getExpiration();
  9. timestamp = msg.getTimestamp();
  10. priority = msg.getPriority();
  11. if (msg instanceof CoreMessage) {
  12. properties = ((CoreMessage) msg).getProperties();
  13. }
  14. }

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

  1. @Override
  2. public void copyHeadersAndProperties(final Message msg) {
  3. messageID = msg.getMessageID();
  4. address = msg.getAddressSimpleString();
  5. userID = (UUID) msg.getUserID();
  6. type = msg.toCore().getType();
  7. durable = msg.isDurable();
  8. expiration = msg.getExpiration();
  9. timestamp = msg.getTimestamp();
  10. priority = msg.getPriority();
  11. if (msg instanceof CoreMessage) {
  12. properties = ((CoreMessage) msg).getTypedProperties();
  13. }
  14. }

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

  1. @Override
  2. public void copyHeadersAndProperties(final Message msg) {
  3. messageID = msg.getMessageID();
  4. address = msg.getAddressSimpleString();
  5. userID = (UUID) msg.getUserID();
  6. type = msg.toCore().getType();
  7. durable = msg.isDurable();
  8. expiration = msg.getExpiration();
  9. timestamp = msg.getTimestamp();
  10. priority = msg.getPriority();
  11. if (msg instanceof CoreMessage) {
  12. properties = ((CoreMessage) msg).getTypedProperties();
  13. }
  14. }

代码示例来源:origin: org.jboss.eap/wildfly-client-all

  1. @Override
  2. public void copyHeadersAndProperties(final Message msg) {
  3. messageID = msg.getMessageID();
  4. address = msg.getAddressSimpleString();
  5. userID = (UUID) msg.getUserID();
  6. type = msg.toCore().getType();
  7. durable = msg.isDurable();
  8. expiration = msg.getExpiration();
  9. timestamp = msg.getTimestamp();
  10. priority = msg.getPriority();
  11. if (msg instanceof CoreMessage) {
  12. properties = ((CoreMessage) msg).getTypedProperties();
  13. }
  14. }

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

  1. return Integer.valueOf(msg.getPriority());
  2. } else if (FilterConstants.ACTIVEMQ_TIMESTAMP.equals(fieldName)) {
  3. return msg.getTimestamp();
  4. } else if (FilterConstants.ACTIVEMQ_DURABLE.equals(fieldName)) {
  5. return msg.isDurable() ? FilterConstants.DURABLE : FilterConstants.NON_DURABLE;

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

  1. command.addHeader(Stomp.Headers.Message.REPLY_TO, message.getStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME));
  2. command.addHeader(Stomp.Headers.Message.TIMESTAMP, "" + message.getTimestamp());

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

  1. command.addHeader(Stomp.Headers.Message.REPLY_TO, message.getStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME));
  2. command.addHeader(Stomp.Headers.Message.TIMESTAMP, "" + message.getTimestamp());

相关文章