[jboss-cvs] JBoss Messaging SVN: r7246 - in trunk/src/main/org/jboss/messaging/core/remoting/impl: wireformat and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jun 8 07:01:46 EDT 2009


Author: timfox
Date: 2009-06-08 07:01:46 -0400 (Mon, 08 Jun 2009)
New Revision: 7246

Removed:
   trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/Pong.java
Modified:
   trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/Ping.java
Log:
removed pong and made ping writealways=true

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java	2009-06-08 10:55:04 UTC (rev 7245)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java	2009-06-08 11:01:46 UTC (rev 7246)
@@ -22,7 +22,6 @@
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.NULL_RESPONSE;
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.PACKETS_CONFIRMED;
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.PING;
-import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.PONG;
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.REATTACH_SESSION;
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.REATTACH_SESSION_RESP;
 import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.REPLICATE_ACKNOWLEDGE;
@@ -590,11 +589,6 @@
             packet = new Ping();
             break;
          }
-         case PONG:
-         {
-            packet = new PacketImpl(PacketImpl.PONG);
-            break;
-         }
          case DISCONNECT:
          {
             packet = new PacketImpl(DISCONNECT);

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java	2009-06-08 10:55:04 UTC (rev 7245)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/PacketImpl.java	2009-06-08 11:01:46 UTC (rev 7246)
@@ -42,9 +42,7 @@
 
    public static final byte PING = 10;
 
-   public static final byte PONG = 11;
-   
-   public static final byte DISCONNECT = 12;
+   public static final byte DISCONNECT = 11;
 
    // Miscellaneous
    public static final byte EXCEPTION = 20;

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/Ping.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/Ping.java	2009-06-08 10:55:04 UTC (rev 7245)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/Ping.java	2009-06-08 11:01:46 UTC (rev 7246)
@@ -62,6 +62,11 @@
 
    // Public --------------------------------------------------------
 
+   public boolean isWriteAlways()
+   {
+      return true;
+   }
+   
    public long getConnectionTTL()
    {
       return connectionTTL;

Deleted: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/Pong.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/Pong.java	2009-06-08 10:55:04 UTC (rev 7245)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/Pong.java	2009-06-08 11:01:46 UTC (rev 7246)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */ 
-
-package org.jboss.messaging.core.remoting.impl.wireformat;
-
-import org.jboss.messaging.core.remoting.spi.MessagingBuffer;
-import org.jboss.messaging.utils.DataConstants;
-
-/**
- * 
- * A Pong
- * 
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- *
- */
-public class Pong extends PacketImpl
-{
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   //This is reserved for future use - for now we also pass back -1 - meaning "don't change period"
-   private long newPeriod;
-
-   // Static --------------------------------------------------------
-
-   // Constructors --------------------------------------------------
-
-   public Pong(final long newPeriod)
-   {
-      super(PONG);
-
-      this.newPeriod = newPeriod;
-   }
-   
-   public Pong()
-   {
-      super(PONG);
-   }
-
-   // Public --------------------------------------------------------
-
-   public boolean isResponse()
-   {
-      return true;
-   }
-   
-   public long getNewPeriod()
-   {
-      return newPeriod;
-   }
-   
-   public int getRequiredBufferSize()
-   {
-      return BASIC_PACKET_SIZE + DataConstants.SIZE_LONG;
-   }
-   
-
-   public void encodeBody(final MessagingBuffer buffer)
-   {
-      buffer.writeLong(newPeriod);
-   }
-   
-   public void decodeBody(final MessagingBuffer buffer)
-   {
-      newPeriod = buffer.readLong();
-   }
-   
-   public boolean isWriteAlways()
-   {
-      return true;
-   }
-
-   @Override
-   public String toString()
-   {
-      StringBuffer buf = new StringBuffer(getParentString());
-      buf.append(", newPeriod=" + newPeriod);
-      buf.append("]");
-      return buf.toString();
-   }
-   
-   public boolean equals(Object other)
-   {
-      if (other instanceof Pong == false)
-      {
-         return false;
-      }
-            
-      Pong r = (Pong)other;
-      
-      return super.equals(other) && this.newPeriod == r.newPeriod;
-   }
-   
-   public final boolean isRequiresConfirmations()
-   {
-      return false;
-   }
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-}
-




More information about the jboss-cvs-commits mailing list