[hornetq-commits] JBoss hornetq SVN: r9786 - in branches/hornetq-416/src/main/org/hornetq: core/protocol/core/impl/wireformat and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Oct 14 05:43:10 EDT 2010


Author: gaohoward
Date: 2010-10-14 05:43:10 -0400 (Thu, 14 Oct 2010)
New Revision: 9786

Modified:
   branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/PacketDecoder.java
   branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java
   branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/wireformat/ConnectionSetClientIDMessage.java
   branches/hornetq-416/src/main/org/hornetq/jms/management/impl/JMSServerControlImpl.java
   branches/hornetq-416/src/main/org/hornetq/spi/core/protocol/RemotingConnection.java
Log:
setClientID impl


Modified: branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/PacketDecoder.java
===================================================================
--- branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/PacketDecoder.java	2010-10-14 00:45:50 UTC (rev 9785)
+++ branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/PacketDecoder.java	2010-10-14 09:43:10 UTC (rev 9786)
@@ -78,10 +78,12 @@
 import static org.hornetq.core.protocol.core.impl.PacketImpl.SESS_XA_SET_TIMEOUT_RESP;
 import static org.hornetq.core.protocol.core.impl.PacketImpl.SESS_XA_START;
 import static org.hornetq.core.protocol.core.impl.PacketImpl.SESS_XA_SUSPEND;
+import static org.hornetq.core.protocol.core.impl.PacketImpl.CONNECTION_SET_CLIENTID;
 
 import org.hornetq.api.core.HornetQBuffer;
 import org.hornetq.core.logging.Logger;
 import org.hornetq.core.protocol.core.Packet;
+import org.hornetq.core.protocol.core.impl.wireformat.ConnectionSetClientIDMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.CreateQueueMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.CreateReplicationSessionMessage;
 import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionMessage;
@@ -486,6 +488,11 @@
             packet = new SessionForceConsumerDelivery();
             break;
          }
+         case CONNECTION_SET_CLIENTID:
+         {
+            packet = new ConnectionSetClientIDMessage();
+            break;
+         }
          default:
          {
             throw new IllegalArgumentException("Invalid type: " + packetType);

Modified: branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java
===================================================================
--- branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java	2010-10-14 00:45:50 UTC (rev 9785)
+++ branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/RemotingConnectionImpl.java	2010-10-14 09:43:10 UTC (rev 9786)
@@ -563,4 +563,9 @@
    {
       clientID = cID;
    }
+   
+   public String getClientID()
+   {
+      return clientID;
+   }
 }

Modified: branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/wireformat/ConnectionSetClientIDMessage.java
===================================================================
--- branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/wireformat/ConnectionSetClientIDMessage.java	2010-10-14 00:45:50 UTC (rev 9785)
+++ branches/hornetq-416/src/main/org/hornetq/core/protocol/core/impl/wireformat/ConnectionSetClientIDMessage.java	2010-10-14 09:43:10 UTC (rev 9786)
@@ -24,6 +24,11 @@
 public class ConnectionSetClientIDMessage extends PacketImpl
 {
    private String clientID;
+   
+   public ConnectionSetClientIDMessage()
+   {
+      super(PacketImpl.CONNECTION_SET_CLIENTID);
+   }
 
    public ConnectionSetClientIDMessage(String cID)
    {

Modified: branches/hornetq-416/src/main/org/hornetq/jms/management/impl/JMSServerControlImpl.java
===================================================================
--- branches/hornetq-416/src/main/org/hornetq/jms/management/impl/JMSServerControlImpl.java	2010-10-14 00:45:50 UTC (rev 9785)
+++ branches/hornetq-416/src/main/org/hornetq/jms/management/impl/JMSServerControlImpl.java	2010-10-14 09:43:10 UTC (rev 9786)
@@ -742,6 +742,7 @@
             obj.put("connectionID", connection.getID().toString());
             obj.put("clientAddress", connection.getRemoteAddress());
             obj.put("creationTime", connection.getCreationTime());
+            obj.put("clientID", connection.getClientID());
             array.put(obj);
          }
          return array.toString();

Modified: branches/hornetq-416/src/main/org/hornetq/spi/core/protocol/RemotingConnection.java
===================================================================
--- branches/hornetq-416/src/main/org/hornetq/spi/core/protocol/RemotingConnection.java	2010-10-14 00:45:50 UTC (rev 9785)
+++ branches/hornetq-416/src/main/org/hornetq/spi/core/protocol/RemotingConnection.java	2010-10-14 09:43:10 UTC (rev 9786)
@@ -13,6 +13,7 @@
 
 package org.hornetq.spi.core.protocol;
 
+import java.util.Collection;
 import java.util.List;
 
 import org.hornetq.api.core.HornetQBuffer;
@@ -172,4 +173,10 @@
     */
    void setClientID(String clientID);
 
+   /**
+    * get the client id
+    * @return the clientID
+    */
+   String getClientID();
+
 }



More information about the hornetq-commits mailing list