hi Justin,

I am using version - apache-artemis-2.4.0. and for the Java dependency i am
importing "*org.apache.activemq:artemis-core-client:2.2.0*"

<http://activemq.2283324.n4.nabble.com/file/t378513/Screen_Shot_2018-03-15_at_8.png>
 

as you can see above the, Packet which is cast to the type
SessionSendMessage has a getMessage() implementation which has the return
Type of the implementation of the Interface ICoreMessage
When in my IntelliJ i click to navigate to where the implementation is it
takes me to the below class. 

import org.apache.activemq.artemis.api.core.ICoreMessage;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;

public abstract class MessagePacket extends PacketImpl implements
MessagePacketI {

   protected ICoreMessage message;

   public MessagePacket(final byte type, final ICoreMessage message) {
      super(type);

      this.message = message;
   }

   @Override
   public ICoreMessage getMessage() {
      return message;
   }

   @Override
   public String getParentString() {
      return super.getParentString() + ", message=" + message;
   }

}

The interface ICoreMessage has multiple implementations as seen below

<http://activemq.2283324.n4.nabble.com/file/t378513/Screen_Shot_2018-03-15_at_8.png>
 


Now the copy Method is being picked up from one of the two implementations
(ClientMessageImpl or CoreMessage) as shown below

<http://activemq.2283324.n4.nabble.com/file/t378513/Screen_Shot_2018-03-15_at_9.png>
 

The getBuffer() method is in CoreMessage implementation, whose return type
is ByteBuf (io.netty.buffer.ByteBuf)

Please let me know if i missed any details or if am wrong. 

Thanks,
Chandra



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply via email to