clebertsuconic commented on a change in pull request #3448:
URL: https://github.com/apache/activemq-artemis/pull/3448#discussion_r574089979
##########
File path:
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java
##########
@@ -137,226 +131,178 @@ public final String getJMSCorrelationID() throws
JMSException {
}
}
- @Override
- public final void setJMSCorrelationID(String correlationID) throws
JMSException {
+ public final void setJMSCorrelationID(String correlationID) throws
Exception {
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() throws Exception {
+ 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) throws Exception {
+ MessageUtil.setJMSReplyTo(message, SimpleString.toSimpleString(replyTo));
}
- @Override
- public Destination getJMSDestination() throws JMSException {
- return ActiveMQDestination.createDestination(message.getRoutingType(),
message.getAddressSimpleString());
+ public SimpleString getJMSDestination() throws Exception {
+ return 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 final void setJMSDestination(String destination) throws Exception {
+ message.setAddress(destination);
}
- @Override
- public final int getJMSDeliveryMode() throws JMSException {
- return message.isDurable() ? DeliveryMode.PERSISTENT :
DeliveryMode.NON_PERSISTENT;
+ public final int getJMSDeliveryMode() throws Exception {
+ return message.isDurable() ? DeliveryMode_PERSISTENT :
DeliveryMode_NON_PERSISTENT;
}
- @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 void setJMSDeliveryMode(int deliveryMode) throws Exception {
+ switch (deliveryMode) {
+ case DeliveryMode_PERSISTENT:
Review comment:
will do that
----------------------------------------------------------------
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]