Skip to content

Commit

Permalink
ARTEMIS-3556 use common protocol identifiers (except when unknown)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwin Dondorp committed Nov 6, 2021
1 parent 4f01182 commit 3800136
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.activemq.artemis.api.core.RefCountMessage;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
import org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper;
import org.apache.activemq.artemis.core.buffers.impl.ResetLimitWrappedActiveMQBuffer;
import org.apache.activemq.artemis.core.message.LargeBodyReader;
Expand Down Expand Up @@ -121,8 +122,9 @@ public CoreMessage() {
this.coreMessageObjectPools = null;
}

@Override
public String getProtocolName() {
return "CORE";
return ActiveMQClient.DEFAULT_CORE_PROTOCOL;
}

/** On core there's no delivery annotation */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class MessageInternalImpl implements MessageInternal {

private CoreMessage message;

@Override
public String getProtocolName() {
// should normally not be visible in GUI
return getClass().getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ protected AMQPMessage(long messageFormat) {
this.coreMessageObjectPools = null;
}

@Override
public String getProtocolName() {
return "AMQP";
return ProtonProtocolManagerFactory.AMQP_PROTOCOL_NAME;
}

public final MessageDataScanningStatus getDataScanningStatus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
// TODO: Implement this
public class OpenwireMessage implements Message {

@Override
public String getProtocolName() {
return "OPENWIRE";
return OpenWireProtocolManagerFactory.OPENWIRE_PROTOCOL_NAME;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ private void debugList(boolean fail,

class FakeMessage implements Message {

@Override
public String getProtocolName() {
// should normally not be visible in GUI
return getClass().getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ class FakeMessageWithID implements Message {

final long id;

@Override
public String getProtocolName() {
// should normally not be visible in GUI
return getClass().getName();
Expand Down

0 comments on commit 3800136

Please sign in to comment.