michaelandrepearce commented on a change in pull request #3450:
URL: https://github.com/apache/activemq-artemis/pull/3450#discussion_r574818330



##########
File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/coreWrapper/CoreMessageWrapper.java
##########
@@ -137,247 +175,187 @@ public final String getJMSCorrelationID() throws 
JMSException {
       }
    }
 
-   @Override
-   public final void setJMSCorrelationID(String correlationID) throws 
JMSException {
+   public final void setJMSCorrelationID(String correlationID)  {
       message.setCorrelationID(correlationID);
    }
 
-   @Override
-   public final Destination getJMSReplyTo() throws JMSException {
-      SimpleString reply = MessageUtil.getJMSReplyTo(message);
-      if (reply != null) {
-         return ActiveMQDestination.fromPrefixedName(reply.toString());
-      } else {
-         return null;
-      }
+   public final SimpleString getJMSReplyTo()  {
+      return MessageUtil.getJMSReplyTo(message);
    }
 
-   @Override
-   public final void setJMSReplyTo(Destination replyTo) throws JMSException {
-      MessageUtil.setJMSReplyTo(message, replyTo == null ? null : 
((ActiveMQDestination) replyTo).getSimpleAddress());
+   public final void setJMSReplyTo(String replyTo)  {
+      MessageUtil.setJMSReplyTo(message, SimpleString.toSimpleString(replyTo));
    }
 
-   @Override
-   public Destination getJMSDestination() throws JMSException {
-      return ActiveMQDestination.createDestination(message.getRoutingType(), 
message.getAddressSimpleString());
-   }
-
-   @Override
-   public final void setJMSDestination(Destination destination) throws 
JMSException {
-      if (destination == null) {
-         message.setAddress((SimpleString) null);
-      } else {
-         message.setAddress(((ActiveMQDestination) 
destination).getSimpleAddress());
+   public SimpleString getDestination()  {
+      if (message.getAddress() == null || message.getAddress().isEmpty()) {
+         return null;
       }
-
+      return 
SimpleString.toSimpleString(AMQPMessageSupport.destination(message.getRoutingType(),
 message.getAddress()));
    }
 
-   @Override
-   public final int getJMSDeliveryMode() throws JMSException {
-      return message.isDurable() ? DeliveryMode.PERSISTENT : 
DeliveryMode.NON_PERSISTENT;
+   public final void setDestination(String destination)  {
+      message.setAddress(destination);
    }
 
-   @Override
-   public final void setJMSDeliveryMode(int deliveryMode) throws JMSException {
-      if (deliveryMode == DeliveryMode.PERSISTENT) {
-         message.setDurable(true);
-      } else if (deliveryMode == DeliveryMode.NON_PERSISTENT) {
-         message.setDurable(false);
-      } else {
-         throw new JMSException("Invalid mode " + deliveryMode);
-      }
+   public final int getJMSDeliveryMode()  {
+      return message.isDurable() ? PERSISTENT : NON_PERSISTENT;
    }
 
-   @Override
-   public final boolean getJMSRedelivered() throws JMSException {
-      return false;
+   public final void setDeliveryMode(int deliveryMode) throws 
ConversionException {
+      switch (deliveryMode) {
+         case PERSISTENT:
+            message.setDurable(true);
+            break;
+         case NON_PERSISTENT:
+            message.setDurable(false);
+            break;
+         default:
+            // There shouldn't be any other values used
+            throw new ConversionException("Invalid mode " + deliveryMode);
+      }
    }
 
-   @Override
-   public final void setJMSRedelivered(boolean redelivered) throws 
JMSException {
-      // no op
-   }
 
-   @Override
-   public final String getJMSType() throws JMSException {
+   public final String getJMSType()  {
       return MessageUtil.getJMSType(message);
    }
 
-   @Override
-   public final void setJMSType(String type) throws JMSException {
+   public final void setJMSType(String type)  {
       MessageUtil.setJMSType(message, type);
    }
 
-   @Override
-   public final long getJMSExpiration() throws JMSException {
+   public final long getExpiration()  {
       return message.getExpiration();
    }
 
-   @Override
-   public final void setJMSExpiration(long expiration) throws JMSException {
+   public final void setJMSExpiration(long expiration)  {
       message.setExpiration(expiration);
    }
 
-   @Override
-   public final long getJMSDeliveryTime() throws JMSException {

Review comment:
       getJMSDeliveryTime
   long getJMSDeliveryTime()
                    throws JMSException
   Gets the message's delivery time value.
   When a message is sent, the JMSDeliveryTime header field is left unassigned. 
After completion of the send or publish method, it holds the delivery time of 
the message. This is the the difference, measured in milliseconds, between the 
delivery time and midnight, January 1, 1970 UTC.
   
   A message's delivery time is the earliest time when a JMS provider may 
deliver the message to a consumer. The provider must not deliver messages 
before the delivery time has been reached.
   
   Returns:
   the message's delivery time value
   Throws:
   JMSException - if the JMS provider fails to get the delivery time due to 
some internal error.
   Since:
   JMS 2.0
   See Also:
   setJMSDeliveryTime(long)
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to