activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [31/53] [abbrv] [partial] activemq-artemis git commit: automatic checkstyle change
Date Mon, 10 Aug 2015 15:13:30 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
index 92e52d3..373bfa4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
@@ -40,10 +40,9 @@ import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.ActiveMQEx
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.PacketsConfirmedMessage;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 
-public final class ChannelImpl implements Channel
-{
-   public enum CHANNEL_ID
-   {
+public final class ChannelImpl implements Channel {
+
+   public enum CHANNEL_ID {
       /**
        * Used for core protocol management.
        */
@@ -67,16 +66,14 @@ public final class ChannelImpl implements Channel
 
       public final long id;
 
-      CHANNEL_ID(long id)
-      {
+      CHANNEL_ID(long id) {
          this.id = id;
       }
 
-      protected static String idToString(long code)
-      {
-         for (CHANNEL_ID channel : EnumSet.allOf(CHANNEL_ID.class))
-         {
-            if (channel.id == code) return channel.toString();
+      protected static String idToString(long code) {
+         for (CHANNEL_ID channel : EnumSet.allOf(CHANNEL_ID.class)) {
+            if (channel.id == code)
+               return channel.toString();
          }
          return Long.toString(code);
       }
@@ -122,32 +119,30 @@ public final class ChannelImpl implements Channel
 
    private final List<Interceptor> interceptors;
 
-   public ChannelImpl(final CoreRemotingConnection connection, final long id, final int confWindowSize, final List<Interceptor> interceptors)
-   {
+   public ChannelImpl(final CoreRemotingConnection connection,
+                      final long id,
+                      final int confWindowSize,
+                      final List<Interceptor> interceptors) {
       this.connection = connection;
 
       this.id = id;
 
       this.confWindowSize = confWindowSize;
 
-      if (confWindowSize != -1)
-      {
+      if (confWindowSize != -1) {
          resendCache = new ConcurrentLinkedQueue<Packet>();
       }
-      else
-      {
+      else {
          resendCache = null;
       }
 
       this.interceptors = interceptors;
    }
 
-   public boolean supports(final byte packetType)
-   {
+   public boolean supports(final byte packetType) {
       int version = connection.getClientVersion();
 
-      switch (packetType)
-      {
+      switch (packetType) {
          case PacketImpl.CLUSTER_TOPOLOGY_V2:
             return version >= 122;
          case PacketImpl.DISCONNECT_CONSUMER:
@@ -165,81 +160,65 @@ public final class ChannelImpl implements Channel
       }
    }
 
-   public long getID()
-   {
+   public long getID() {
       return id;
    }
 
-   public int getLastConfirmedCommandID()
-   {
+   public int getLastConfirmedCommandID() {
       return lastConfirmedCommandID.get();
    }
 
-   public Lock getLock()
-   {
+   public Lock getLock() {
       return lock;
    }
 
-   public int getConfirmationWindowSize()
-   {
+   public int getConfirmationWindowSize() {
       return confWindowSize;
    }
 
-   public void returnBlocking()
-   {
+   public void returnBlocking() {
       returnBlocking(null);
    }
 
-   public void returnBlocking(Throwable cause)
-   {
+   public void returnBlocking(Throwable cause) {
       lock.lock();
 
-      try
-      {
+      try {
          response = new ActiveMQExceptionMessage(ActiveMQClientMessageBundle.BUNDLE.unblockingACall(cause));
 
          sendCondition.signal();
       }
-      finally
-      {
+      finally {
          lock.unlock();
       }
    }
 
-   public boolean sendAndFlush(final Packet packet)
-   {
+   public boolean sendAndFlush(final Packet packet) {
       return send(packet, true, false);
    }
 
-   public boolean send(final Packet packet)
-   {
+   public boolean send(final Packet packet) {
       return send(packet, false, false);
    }
 
-   public boolean sendBatched(final Packet packet)
-   {
+   public boolean sendBatched(final Packet packet) {
       return send(packet, false, true);
    }
 
-   public void setTransferring(boolean transferring)
-   {
+   public void setTransferring(boolean transferring) {
       this.transferring = transferring;
    }
 
    // This must never called by more than one thread concurrently
-   public boolean send(final Packet packet, final boolean flush, final boolean batch)
-   {
-      if (invokeInterceptors(packet, interceptors, connection) != null)
-      {
+   public boolean send(final Packet packet, final boolean flush, final boolean batch) {
+      if (invokeInterceptors(packet, interceptors, connection) != null) {
          return false;
       }
 
-      synchronized (sendLock)
-      {
+      synchronized (sendLock) {
          packet.setChannelID(id);
 
-         if (isTrace)
-         {
+         if (isTrace) {
             ActiveMQClientLogger.LOGGER.trace("Sending packet nonblocking " + packet + " on channeID=" + id);
          }
 
@@ -247,43 +226,34 @@ public final class ChannelImpl implements Channel
 
          lock.lock();
 
-         try
-         {
-            if (failingOver)
-            {
+         try {
+            if (failingOver) {
                // TODO - don't hardcode this timeout
-               try
-               {
+               try {
                   failoverCondition.await(10000, TimeUnit.MILLISECONDS);
                }
-               catch (InterruptedException e)
-               {
+               catch (InterruptedException e) {
                   throw new ActiveMQInterruptedException(e);
                }
             }
 
             // Sanity check
-            if (transferring)
-            {
+            if (transferring) {
                throw new IllegalStateException("Cannot send a packet while channel is doing failover");
             }
 
-            if (resendCache != null && packet.isRequiresConfirmations())
-            {
+            if (resendCache != null && packet.isRequiresConfirmations()) {
                resendCache.add(packet);
             }
          }
-         finally
-         {
+         finally {
             lock.unlock();
          }
 
-         if (isTrace)
-         {
+         if (isTrace) {
             ActiveMQClientLogger.LOGGER.trace("Writing buffer for channelID=" + id);
          }
 
-
          // The actual send must be outside the lock, or with OIO transport, the write can block if the tcp
          // buffer is full, preventing any incoming buffers being handled and blocking failover
          connection.getTransportConnection().write(buffer, flush, batch);
@@ -297,67 +267,53 @@ public final class ChannelImpl implements Channel
     * and the client could eventually retry another call, but the server could then answer a previous command issuing a class-cast-exception.
     * The expectedPacket will be used to filter out undesirable packets that would belong to previous calls.
     */
-   public Packet sendBlocking(final Packet packet, byte expectedPacket) throws ActiveMQException
-   {
+   public Packet sendBlocking(final Packet packet, byte expectedPacket) throws ActiveMQException {
       String interceptionResult = invokeInterceptors(packet, interceptors, connection);
 
-      if (interceptionResult != null)
-      {
+      if (interceptionResult != null) {
          // if we don't throw an exception here the client might not unblock
          throw ActiveMQClientMessageBundle.BUNDLE.interceptorRejectedPacket(interceptionResult);
       }
 
-      if (closed)
-      {
+      if (closed) {
          throw ActiveMQClientMessageBundle.BUNDLE.connectionDestroyed();
       }
 
-      if (connection.getBlockingCallTimeout() == -1)
-      {
+      if (connection.getBlockingCallTimeout() == -1) {
          throw new IllegalStateException("Cannot do a blocking call timeout on a server side connection");
       }
 
       // Synchronized since can't be called concurrently by more than one thread and this can occur
       // E.g. blocking acknowledge() from inside a message handler at some time as other operation on main thread
-      synchronized (sendBlockingLock)
-      {
+      synchronized (sendBlockingLock) {
          packet.setChannelID(id);
 
          final ActiveMQBuffer buffer = packet.encode(connection);
 
          lock.lock();
 
-         try
-         {
-            if (failingOver)
-            {
-               try
-               {
-                  if (connection.getBlockingCallFailoverTimeout() < 0)
-                  {
-                     while (failingOver)
-                     {
+         try {
+            if (failingOver) {
+               try {
+                  if (connection.getBlockingCallFailoverTimeout() < 0) {
+                     while (failingOver) {
                         failoverCondition.await();
                      }
                   }
-                  else
-                  {
-                     if (!failoverCondition.await(connection.getBlockingCallFailoverTimeout(), TimeUnit.MILLISECONDS))
-                     {
+                  else {
+                     if (!failoverCondition.await(connection.getBlockingCallFailoverTimeout(), TimeUnit.MILLISECONDS)) {
                         ActiveMQClientLogger.LOGGER.debug("timed-out waiting for failover condition");
                      }
                   }
                }
-               catch (InterruptedException e)
-               {
+               catch (InterruptedException e) {
                   throw new ActiveMQInterruptedException(e);
                }
             }
 
             response = null;
 
-            if (resendCache != null && packet.isRequiresConfirmations())
-            {
+            if (resendCache != null && packet.isRequiresConfirmations()) {
                resendCache.add(packet);
             }
 
@@ -367,25 +323,19 @@ public final class ChannelImpl implements Channel
 
             long start = System.currentTimeMillis();
 
-            while (!closed && (response == null || (response.getType() != PacketImpl.EXCEPTION &&
-               response.getType() != expectedPacket)) && toWait > 0)
-            {
-               try
-               {
+            while (!closed && (response == null || (response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket)) && toWait > 0) {
+               try {
                   sendCondition.await(toWait, TimeUnit.MILLISECONDS);
                }
-               catch (InterruptedException e)
-               {
+               catch (InterruptedException e) {
                   throw new ActiveMQInterruptedException(e);
                }
 
-               if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket)
-               {
+               if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket) {
                   ActiveMQClientLogger.LOGGER.packetOutOfOrder(response, new Exception("trace"));
                }
 
-               if (closed)
-               {
+               if (closed) {
                   break;
                }
 
@@ -396,13 +346,11 @@ public final class ChannelImpl implements Channel
                start = now;
             }
 
-            if (response == null)
-            {
+            if (response == null) {
                throw ActiveMQClientMessageBundle.BUNDLE.timedOutSendingPacket(connection.getBlockingCallTimeout(), packet.getType());
             }
 
-            if (response.getType() == PacketImpl.EXCEPTION)
-            {
+            if (response.getType() == PacketImpl.EXCEPTION) {
                final ActiveMQExceptionMessage mem = (ActiveMQExceptionMessage) response;
 
                ActiveMQException e = mem.getException();
@@ -412,8 +360,7 @@ public final class ChannelImpl implements Channel
                throw e;
             }
          }
-         finally
-         {
+         finally {
             lock.unlock();
          }
 
@@ -426,18 +373,15 @@ public final class ChannelImpl implements Channel
     * @return the name of the interceptor that returned <code>false</code> or <code>null</code> if no interceptors
     * returned <code>false</code>.
     */
-   public static String invokeInterceptors(final Packet packet, final List<Interceptor> interceptors, final RemotingConnection connection)
-   {
-      if (interceptors != null)
-      {
-         for (final Interceptor interceptor : interceptors)
-         {
-            try
-            {
+   public static String invokeInterceptors(final Packet packet,
+                                           final List<Interceptor> interceptors,
+                                           final RemotingConnection connection) {
+      if (interceptors != null) {
+         for (final Interceptor interceptor : interceptors) {
+            try {
                boolean callNext = interceptor.intercept(packet, connection);
 
-               if (ActiveMQClientLogger.LOGGER.isDebugEnabled())
-               {
+               if (ActiveMQClientLogger.LOGGER.isDebugEnabled()) {
                   // use a StringBuilder for speed since this may be executed a lot
                   StringBuilder msg = new StringBuilder();
                   msg.append("Invocation of interceptor ").append(interceptor.getClass().getName()).append(" on ").
@@ -445,13 +389,11 @@ public final class ChannelImpl implements Channel
                   ActiveMQClientLogger.LOGGER.debug(msg.toString());
                }
 
-               if (!callNext)
-               {
+               if (!callNext) {
                   return interceptor.getClass().getName();
                }
             }
-            catch (final Throwable e)
-            {
+            catch (final Throwable e) {
                ActiveMQClientLogger.LOGGER.errorCallingInterceptor(e, interceptor);
             }
          }
@@ -460,53 +402,41 @@ public final class ChannelImpl implements Channel
       return null;
    }
 
-   public void setCommandConfirmationHandler(final CommandConfirmationHandler handler)
-   {
-      if (confWindowSize < 0)
-      {
-         final String msg =
-            "You can't set confirmationHandler on a connection with confirmation-window-size < 0."
-               + " Look at the documentation for more information.";
+   public void setCommandConfirmationHandler(final CommandConfirmationHandler handler) {
+      if (confWindowSize < 0) {
+         final String msg = "You can't set confirmationHandler on a connection with confirmation-window-size < 0." + " Look at the documentation for more information.";
          throw new IllegalStateException(msg);
       }
       commandConfirmationHandler = handler;
    }
 
-   public void setHandler(final ChannelHandler handler)
-   {
+   public void setHandler(final ChannelHandler handler) {
       this.handler = handler;
    }
 
-   public ChannelHandler getHandler()
-   {
+   public ChannelHandler getHandler() {
       return handler;
    }
 
-   public void close()
-   {
-      if (closed)
-      {
+   public void close() {
+      if (closed) {
          return;
       }
 
-      if (!connection.isDestroyed() && !connection.removeChannel(id))
-      {
+      if (!connection.isDestroyed() && !connection.removeChannel(id)) {
          throw ActiveMQClientMessageBundle.BUNDLE.noChannelToClose(id);
       }
 
-      if (failingOver)
-      {
+      if (failingOver) {
          unlock();
       }
       closed = true;
    }
 
-   public void transferConnection(final CoreRemotingConnection newConnection)
-   {
+   public void transferConnection(final CoreRemotingConnection newConnection) {
       // Needs to synchronize on the connection to make sure no packets from
       // the old connection get processed after transfer has occurred
-      synchronized (connection.getTransferLock())
-      {
+      synchronized (connection.getTransferLock()) {
          connection.removeChannel(id);
 
          // And switch it
@@ -521,25 +451,20 @@ public final class ChannelImpl implements Channel
       }
    }
 
-   public void replayCommands(final int otherLastConfirmedCommandID)
-   {
-      if (resendCache != null)
-      {
-         if (isTrace)
-         {
+   public void replayCommands(final int otherLastConfirmedCommandID) {
+      if (resendCache != null) {
+         if (isTrace) {
             ActiveMQClientLogger.LOGGER.trace("Replaying commands on channelID=" + id);
          }
          clearUpTo(otherLastConfirmedCommandID);
 
-         for (final Packet packet : resendCache)
-         {
+         for (final Packet packet : resendCache) {
             doWrite(packet);
          }
       }
    }
 
-   public void lock()
-   {
+   public void lock() {
       lock.lock();
 
       failingOver = true;
@@ -547,8 +472,7 @@ public final class ChannelImpl implements Channel
       lock.unlock();
    }
 
-   public void unlock()
-   {
+   public void unlock() {
       lock.lock();
 
       failingOver = false;
@@ -558,16 +482,13 @@ public final class ChannelImpl implements Channel
       lock.unlock();
    }
 
-   public CoreRemotingConnection getConnection()
-   {
+   public CoreRemotingConnection getConnection() {
       return connection;
    }
 
    // Needs to be synchronized since can be called by remoting service timer thread too for timeout flush
-   public synchronized void flushConfirmations()
-   {
-      if (resendCache != null && receivedBytes != 0)
-      {
+   public synchronized void flushConfirmations() {
+      if (resendCache != null && receivedBytes != 0) {
          receivedBytes = 0;
 
          final Packet confirmed = new PacketsConfirmedMessage(lastConfirmedCommandID.get());
@@ -578,16 +499,13 @@ public final class ChannelImpl implements Channel
       }
    }
 
-   public void confirm(final Packet packet)
-   {
-      if (resendCache != null && packet.isRequiresConfirmations())
-      {
+   public void confirm(final Packet packet) {
+      if (resendCache != null && packet.isRequiresConfirmations()) {
          lastConfirmedCommandID.incrementAndGet();
 
          receivedBytes += packet.getPacketSize();
 
-         if (receivedBytes >= confWindowSize)
-         {
+         if (receivedBytes >= confWindowSize) {
             receivedBytes = 0;
 
             final Packet confirmed = new PacketsConfirmedMessage(lastConfirmedCommandID.get());
@@ -599,10 +517,8 @@ public final class ChannelImpl implements Channel
       }
    }
 
-   public void clearCommands()
-   {
-      if (resendCache != null)
-      {
+   public void clearCommands() {
+      if (resendCache != null) {
          lastConfirmedCommandID.set(-1);
 
          firstStoredCommandID = 0;
@@ -611,88 +527,71 @@ public final class ChannelImpl implements Channel
       }
    }
 
-   public void handlePacket(final Packet packet)
-   {
-      if (packet.getType() == PacketImpl.PACKETS_CONFIRMED)
-      {
-         if (resendCache != null)
-         {
+   public void handlePacket(final Packet packet) {
+      if (packet.getType() == PacketImpl.PACKETS_CONFIRMED) {
+         if (resendCache != null) {
             final PacketsConfirmedMessage msg = (PacketsConfirmedMessage) packet;
 
             clearUpTo(msg.getCommandID());
          }
 
-         if (!connection.isClient())
-         {
+         if (!connection.isClient()) {
             handler.handlePacket(packet);
          }
 
          return;
       }
-      else
-      {
-         if (packet.isResponse())
-         {
+      else {
+         if (packet.isResponse()) {
             confirm(packet);
 
             lock.lock();
 
-            try
-            {
+            try {
                response = packet;
                sendCondition.signal();
             }
-            finally
-            {
+            finally {
                lock.unlock();
             }
          }
-         else if (handler != null)
-         {
+         else if (handler != null) {
             handler.handlePacket(packet);
          }
       }
    }
 
-   private void doWrite(final Packet packet)
-   {
+   private void doWrite(final Packet packet) {
       final ActiveMQBuffer buffer = packet.encode(connection);
 
       connection.getTransportConnection().write(buffer, false, false);
    }
 
-   private void clearUpTo(final int lastReceivedCommandID)
-   {
+   private void clearUpTo(final int lastReceivedCommandID) {
       final int numberToClear = 1 + lastReceivedCommandID - firstStoredCommandID;
 
-      if (numberToClear == -1)
-      {
+      if (numberToClear == -1) {
          throw ActiveMQClientMessageBundle.BUNDLE.invalidCommandID(lastReceivedCommandID);
       }
 
       int sizeToFree = 0;
 
-      for (int i = 0; i < numberToClear; i++)
-      {
+      for (int i = 0; i < numberToClear; i++) {
          final Packet packet = resendCache.poll();
 
-         if (packet == null)
-         {
-            if (lastReceivedCommandID > 0)
-            {
+         if (packet == null) {
+            if (lastReceivedCommandID > 0) {
                ActiveMQClientLogger.LOGGER.cannotFindPacketToClear(lastReceivedCommandID, firstStoredCommandID);
             }
             firstStoredCommandID = lastReceivedCommandID + 1;
             return;
          }
 
-         if (packet.getType() != PacketImpl.PACKETS_CONFIRMED)
-         {
+         if (packet.getType() != PacketImpl.PACKETS_CONFIRMED) {
             sizeToFree += packet.getPacketSize();
          }
 
-         if (commandConfirmationHandler != null)
-         {
+         if (commandConfirmationHandler != null) {
             commandConfirmationHandler.commandConfirmed(packet);
          }
       }
@@ -701,8 +600,7 @@ public final class ChannelImpl implements Channel
    }
 
    @Override
-   public String toString()
-   {
+   public String toString() {
       return "Channel[id=" + CHANNEL_ID.idToString(id) + ", handler=" + handler + "]";
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java
index f051de2..804a26a 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java
@@ -145,338 +145,271 @@ import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionXAS
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SubscribeClusterTopologyUpdatesMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SubscribeClusterTopologyUpdatesMessageV2;
 
-public abstract class PacketDecoder implements Serializable
-{
+public abstract class PacketDecoder implements Serializable {
+
    public abstract Packet decode(final ActiveMQBuffer in);
 
-   public Packet decode(byte packetType)
-   {
+   public Packet decode(byte packetType) {
       Packet packet;
 
-      switch (packetType)
-      {
-         case PING:
-         {
+      switch (packetType) {
+         case PING: {
             packet = new Ping();
             break;
          }
-         case DISCONNECT:
-         {
+         case DISCONNECT: {
             packet = new DisconnectMessage();
             break;
          }
-         case DISCONNECT_V2:
-         {
+         case DISCONNECT_V2: {
             packet = new DisconnectMessage_V2();
             break;
          }
-         case DISCONNECT_CONSUMER:
-         {
+         case DISCONNECT_CONSUMER: {
             packet = new DisconnectConsumerMessage();
             break;
          }
-         case EXCEPTION:
-         {
+         case EXCEPTION: {
             packet = new ActiveMQExceptionMessage();
             break;
          }
-         case PACKETS_CONFIRMED:
-         {
+         case PACKETS_CONFIRMED: {
             packet = new PacketsConfirmedMessage();
             break;
          }
-         case CREATESESSION:
-         {
+         case CREATESESSION: {
             packet = new CreateSessionMessage();
             break;
          }
-         case CHECK_FOR_FAILOVER:
-         {
+         case CHECK_FOR_FAILOVER: {
             packet = new CheckFailoverMessage();
             break;
          }
-         case CREATESESSION_RESP:
-         {
+         case CREATESESSION_RESP: {
             packet = new CreateSessionResponseMessage();
             break;
          }
-         case REATTACH_SESSION:
-         {
+         case REATTACH_SESSION: {
             packet = new ReattachSessionMessage();
             break;
          }
-         case REATTACH_SESSION_RESP:
-         {
+         case REATTACH_SESSION_RESP: {
             packet = new ReattachSessionResponseMessage();
             break;
          }
-         case SESS_CLOSE:
-         {
+         case SESS_CLOSE: {
             packet = new SessionCloseMessage();
             break;
          }
-         case SESS_CREATECONSUMER:
-         {
+         case SESS_CREATECONSUMER: {
             packet = new SessionCreateConsumerMessage();
             break;
          }
-         case SESS_ACKNOWLEDGE:
-         {
+         case SESS_ACKNOWLEDGE: {
             packet = new SessionAcknowledgeMessage();
             break;
          }
-         case SESS_EXPIRED:
-         {
+         case SESS_EXPIRED: {
             packet = new SessionExpireMessage();
             break;
          }
-         case SESS_COMMIT:
-         {
+         case SESS_COMMIT: {
             packet = new SessionCommitMessage();
             break;
          }
-         case SESS_ROLLBACK:
-         {
+         case SESS_ROLLBACK: {
             packet = new RollbackMessage();
             break;
          }
-         case SESS_QUEUEQUERY:
-         {
+         case SESS_QUEUEQUERY: {
             packet = new SessionQueueQueryMessage();
             break;
          }
-         case SESS_QUEUEQUERY_RESP:
-         {
+         case SESS_QUEUEQUERY_RESP: {
             packet = new SessionQueueQueryResponseMessage();
             break;
          }
-         case SESS_QUEUEQUERY_RESP_V2:
-         {
+         case SESS_QUEUEQUERY_RESP_V2: {
             packet = new SessionQueueQueryResponseMessage_V2();
             break;
          }
-         case CREATE_QUEUE:
-         {
+         case CREATE_QUEUE: {
             packet = new CreateQueueMessage();
             break;
          }
-         case CREATE_SHARED_QUEUE:
-         {
+         case CREATE_SHARED_QUEUE: {
             packet = new CreateSharedQueueMessage();
             break;
          }
-         case DELETE_QUEUE:
-         {
+         case DELETE_QUEUE: {
             packet = new SessionDeleteQueueMessage();
             break;
          }
-         case SESS_BINDINGQUERY:
-         {
+         case SESS_BINDINGQUERY: {
             packet = new SessionBindingQueryMessage();
             break;
          }
-         case SESS_BINDINGQUERY_RESP:
-         {
+         case SESS_BINDINGQUERY_RESP: {
             packet = new SessionBindingQueryResponseMessage();
             break;
          }
-         case SESS_BINDINGQUERY_RESP_V2:
-         {
+         case SESS_BINDINGQUERY_RESP_V2: {
             packet = new SessionBindingQueryResponseMessage_V2();
             break;
          }
-         case SESS_XA_START:
-         {
+         case SESS_XA_START: {
             packet = new SessionXAStartMessage();
             break;
          }
-         case SESS_XA_FAILED:
-         {
+         case SESS_XA_FAILED: {
             packet = new SessionXAAfterFailedMessage();
             break;
          }
-         case SESS_XA_END:
-         {
+         case SESS_XA_END: {
             packet = new SessionXAEndMessage();
             break;
          }
-         case SESS_XA_COMMIT:
-         {
+         case SESS_XA_COMMIT: {
             packet = new SessionXACommitMessage();
             break;
          }
-         case SESS_XA_PREPARE:
-         {
+         case SESS_XA_PREPARE: {
             packet = new SessionXAPrepareMessage();
             break;
          }
-         case SESS_XA_RESP:
-         {
+         case SESS_XA_RESP: {
             packet = new SessionXAResponseMessage();
             break;
          }
-         case SESS_XA_ROLLBACK:
-         {
+         case SESS_XA_ROLLBACK: {
             packet = new SessionXARollbackMessage();
             break;
          }
-         case SESS_XA_JOIN:
-         {
+         case SESS_XA_JOIN: {
             packet = new SessionXAJoinMessage();
             break;
          }
-         case SESS_XA_SUSPEND:
-         {
+         case SESS_XA_SUSPEND: {
             packet = new PacketImpl(PacketImpl.SESS_XA_SUSPEND);
             break;
          }
-         case SESS_XA_RESUME:
-         {
+         case SESS_XA_RESUME: {
             packet = new SessionXAResumeMessage();
             break;
          }
-         case SESS_XA_FORGET:
-         {
+         case SESS_XA_FORGET: {
             packet = new SessionXAForgetMessage();
             break;
          }
-         case SESS_XA_INDOUBT_XIDS:
-         {
+         case SESS_XA_INDOUBT_XIDS: {
             packet = new PacketImpl(PacketImpl.SESS_XA_INDOUBT_XIDS);
             break;
          }
-         case SESS_XA_INDOUBT_XIDS_RESP:
-         {
+         case SESS_XA_INDOUBT_XIDS_RESP: {
             packet = new SessionXAGetInDoubtXidsResponseMessage();
             break;
          }
-         case SESS_XA_SET_TIMEOUT:
-         {
+         case SESS_XA_SET_TIMEOUT: {
             packet = new SessionXASetTimeoutMessage();
             break;
          }
-         case SESS_XA_SET_TIMEOUT_RESP:
-         {
+         case SESS_XA_SET_TIMEOUT_RESP: {
             packet = new SessionXASetTimeoutResponseMessage();
             break;
          }
-         case SESS_XA_GET_TIMEOUT:
-         {
+         case SESS_XA_GET_TIMEOUT: {
             packet = new PacketImpl(PacketImpl.SESS_XA_GET_TIMEOUT);
             break;
          }
-         case SESS_XA_GET_TIMEOUT_RESP:
-         {
+         case SESS_XA_GET_TIMEOUT_RESP: {
             packet = new SessionXAGetTimeoutResponseMessage();
             break;
          }
-         case SESS_START:
-         {
+         case SESS_START: {
             packet = new PacketImpl(PacketImpl.SESS_START);
             break;
          }
-         case SESS_STOP:
-         {
+         case SESS_STOP: {
             packet = new PacketImpl(PacketImpl.SESS_STOP);
             break;
          }
-         case SESS_FLOWTOKEN:
-         {
+         case SESS_FLOWTOKEN: {
             packet = new SessionConsumerFlowCreditMessage();
             break;
          }
-         case SESS_CONSUMER_CLOSE:
-         {
+         case SESS_CONSUMER_CLOSE: {
             packet = new SessionConsumerCloseMessage();
             break;
          }
-         case SESS_INDIVIDUAL_ACKNOWLEDGE:
-         {
+         case SESS_INDIVIDUAL_ACKNOWLEDGE: {
             packet = new SessionIndividualAcknowledgeMessage();
             break;
          }
-         case NULL_RESPONSE:
-         {
+         case NULL_RESPONSE: {
             packet = new NullResponseMessage();
             break;
          }
-         case SESS_RECEIVE_CONTINUATION:
-         {
+         case SESS_RECEIVE_CONTINUATION: {
             packet = new SessionReceiveContinuationMessage();
             break;
          }
-         case SESS_SEND_CONTINUATION:
-         {
+         case SESS_SEND_CONTINUATION: {
             packet = new SessionSendContinuationMessage();
             break;
          }
-         case SESS_PRODUCER_REQUEST_CREDITS:
-         {
+         case SESS_PRODUCER_REQUEST_CREDITS: {
             packet = new SessionRequestProducerCreditsMessage();
             break;
          }
-         case SESS_PRODUCER_CREDITS:
-         {
+         case SESS_PRODUCER_CREDITS: {
             packet = new SessionProducerCreditsMessage();
             break;
          }
-         case SESS_PRODUCER_FAIL_CREDITS:
-         {
+         case SESS_PRODUCER_FAIL_CREDITS: {
             packet = new SessionProducerCreditsFailMessage();
             break;
          }
-         case SESS_FORCE_CONSUMER_DELIVERY:
-         {
+         case SESS_FORCE_CONSUMER_DELIVERY: {
             packet = new SessionForceConsumerDelivery();
             break;
          }
-         case CLUSTER_TOPOLOGY:
-         {
+         case CLUSTER_TOPOLOGY: {
             packet = new ClusterTopologyChangeMessage();
             break;
          }
-         case CLUSTER_TOPOLOGY_V2:
-         {
+         case CLUSTER_TOPOLOGY_V2: {
             packet = new ClusterTopologyChangeMessage_V2();
             break;
          }
-         case CLUSTER_TOPOLOGY_V3:
-         {
+         case CLUSTER_TOPOLOGY_V3: {
             packet = new ClusterTopologyChangeMessage_V3();
             break;
          }
-         case SUBSCRIBE_TOPOLOGY:
-         {
+         case SUBSCRIBE_TOPOLOGY: {
             packet = new SubscribeClusterTopologyUpdatesMessage();
             break;
          }
-         case SUBSCRIBE_TOPOLOGY_V2:
-         {
+         case SUBSCRIBE_TOPOLOGY_V2: {
             packet = new SubscribeClusterTopologyUpdatesMessageV2();
             break;
          }
-         case SESS_ADD_METADATA:
-         {
+         case SESS_ADD_METADATA: {
             packet = new SessionAddMetaDataMessage();
             break;
          }
-         case SESS_ADD_METADATA2:
-         {
+         case SESS_ADD_METADATA2: {
             packet = new SessionAddMetaDataMessageV2();
             break;
          }
-         case SESS_UNIQUE_ADD_METADATA:
-         {
+         case SESS_UNIQUE_ADD_METADATA: {
             packet = new SessionUniqueAddMetaDataMessage();
             break;
          }
-         case PacketImpl.CHECK_FOR_FAILOVER_REPLY:
-         {
+         case PacketImpl.CHECK_FOR_FAILOVER_REPLY: {
             packet = new CheckFailoverReplyMessage();
             break;
          }
-         default:
-         {
+         default: {
             throw ActiveMQClientMessageBundle.BUNDLE.invalidType(packetType);
          }
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java
index d71c60a..06e259b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java
@@ -21,14 +21,13 @@ import org.apache.activemq.artemis.core.protocol.core.Packet;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 import org.apache.activemq.artemis.utils.DataConstants;
 
-public class PacketImpl implements Packet
-{
+public class PacketImpl implements Packet {
    // Constants -------------------------------------------------------------------------
 
    // The minimal size for all the packets, Common data for all the packets (look at
    // PacketImpl.encode)
    public static final int PACKET_HEADERS_SIZE = DataConstants.SIZE_INT + DataConstants.SIZE_BYTE +
-                                                 DataConstants.SIZE_LONG;
+      DataConstants.SIZE_LONG;
 
    private static final int INITIAL_PACKET_SIZE = 1500;
 
@@ -194,8 +193,6 @@ public class PacketImpl implements Packet
 
    public static final byte SESS_UNIQUE_ADD_METADATA = 106;
 
-
-
    // HA
 
    public static final byte CLUSTER_TOPOLOGY = 110;
@@ -248,30 +245,25 @@ public class PacketImpl implements Packet
 
    // Static --------------------------------------------------------
 
-   public PacketImpl(final byte type)
-   {
+   public PacketImpl(final byte type) {
       this.type = type;
    }
 
    // Public --------------------------------------------------------
 
-   public byte getType()
-   {
+   public byte getType() {
       return type;
    }
 
-   public long getChannelID()
-   {
+   public long getChannelID() {
       return channelID;
    }
 
-   public void setChannelID(final long channelID)
-   {
+   public void setChannelID(final long channelID) {
       this.channelID = channelID;
    }
 
-   public ActiveMQBuffer encode(final RemotingConnection connection)
-   {
+   public ActiveMQBuffer encode(final RemotingConnection connection) {
       ActiveMQBuffer buffer = connection.createTransportBuffer(PacketImpl.INITIAL_PACKET_SIZE);
 
       // The standard header fields
@@ -292,8 +284,7 @@ public class PacketImpl implements Packet
       return buffer;
    }
 
-   public void decode(final ActiveMQBuffer buffer)
-   {
+   public void decode(final ActiveMQBuffer buffer) {
       channelID = buffer.readLong();
 
       decodeRest(buffer);
@@ -301,78 +292,64 @@ public class PacketImpl implements Packet
       size = buffer.readerIndex();
    }
 
-   public int getPacketSize()
-   {
-      if (size == -1)
-      {
+   public int getPacketSize() {
+      if (size == -1) {
          throw new IllegalStateException("Packet hasn't been encoded/decoded yet");
       }
 
       return size;
    }
 
-   public boolean isResponse()
-   {
+   public boolean isResponse() {
       return false;
    }
 
-   public void encodeRest(final ActiveMQBuffer buffer)
-   {
+   public void encodeRest(final ActiveMQBuffer buffer) {
    }
 
-   public void decodeRest(final ActiveMQBuffer buffer)
-   {
+   public void decodeRest(final ActiveMQBuffer buffer) {
    }
 
-   public boolean isRequiresConfirmations()
-   {
+   public boolean isRequiresConfirmations() {
       return true;
    }
 
    @Override
-   public String toString()
-   {
+   public String toString() {
       return getParentString() + "]";
    }
 
    @Override
-   public int hashCode()
-   {
+   public int hashCode() {
       final int prime = 31;
       int result = 1;
-      result = prime * result + (int)(channelID ^ (channelID >>> 32));
+      result = prime * result + (int) (channelID ^ (channelID >>> 32));
       result = prime * result + size;
       result = prime * result + type;
       return result;
    }
 
    @Override
-   public boolean equals(Object obj)
-   {
-      if (this == obj)
-      {
+   public boolean equals(Object obj) {
+      if (this == obj) {
          return true;
       }
-      if (!(obj instanceof PacketImpl))
-      {
+      if (!(obj instanceof PacketImpl)) {
          return false;
       }
-      PacketImpl other = (PacketImpl)obj;
+      PacketImpl other = (PacketImpl) obj;
       return (channelID == other.channelID) && (size == other.size) && (type != other.type);
    }
 
-   protected String getParentString()
-   {
-      return "PACKET("  + this.getClass().getSimpleName() + ")[type=" + type + ", channelID=" + channelID + ", packetObject=" + this.getClass().getSimpleName();
+   protected String getParentString() {
+      return "PACKET(" + this.getClass().getSimpleName() + ")[type=" + type + ", channelID=" + channelID + ", packetObject=" + this.getClass().getSimpleName();
    }
 
-   private int stringEncodeSize(final String str)
-   {
+   private int stringEncodeSize(final String str) {
       return DataConstants.SIZE_INT + str.length() * 2;
    }
 
-   protected int nullableStringEncodeSize(final String str)
-   {
+   protected int nullableStringEncodeSize(final String str) {
       return DataConstants.SIZE_BOOLEAN + (str != null ? stringEncodeSize(str) : 0);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
index 4f192d3..7bd68ad 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java
@@ -39,8 +39,7 @@ import org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
 import org.apache.activemq.artemis.utils.SimpleIDGenerator;
 
-public class RemotingConnectionImpl extends AbstractRemotingConnection implements CoreRemotingConnection
-{
+public class RemotingConnectionImpl extends AbstractRemotingConnection implements CoreRemotingConnection {
    // Constants
    // ------------------------------------------------------------------------------------
 
@@ -92,8 +91,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
                                  final long blockingCallTimeout,
                                  final long blockingCallFailoverTimeout,
                                  final List<Interceptor> incomingInterceptors,
-                                 final List<Interceptor> outgoingInterceptors)
-   {
+                                 final List<Interceptor> outgoingInterceptors) {
       this(packetDecoder, transportConnection, blockingCallTimeout, blockingCallFailoverTimeout, incomingInterceptors, outgoingInterceptors, true, null, null);
    }
 
@@ -141,13 +139,11 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
       transportConnection.setProtocolConnection(this);
    }
 
-
    // RemotingConnection implementation
    // ------------------------------------------------------------
 
    @Override
-   public String toString()
-   {
+   public String toString() {
       return "RemotingConnectionImpl [clientID=" + clientID +
          ", nodeID=" +
          nodeID +
@@ -159,25 +155,21 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
    /**
     * @return the clientVersion
     */
-   public int getClientVersion()
-   {
+   public int getClientVersion() {
       return clientVersion;
    }
 
    /**
     * @param clientVersion the clientVersion to set
     */
-   public void setClientVersion(int clientVersion)
-   {
+   public void setClientVersion(int clientVersion) {
       this.clientVersion = clientVersion;
    }
 
-   public synchronized Channel getChannel(final long channelID, final int confWindowSize)
-   {
+   public synchronized Channel getChannel(final long channelID, final int confWindowSize) {
       Channel channel = channels.get(channelID);
 
-      if (channel == null)
-      {
+      if (channel == null) {
          channel = new ChannelImpl(this, channelID, confWindowSize, outgoingInterceptors);
 
          channels.put(channelID, channel);
@@ -186,22 +178,17 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
       return channel;
    }
 
-   public synchronized boolean removeChannel(final long channelID)
-   {
+   public synchronized boolean removeChannel(final long channelID) {
       return channels.remove(channelID) != null;
    }
 
-   public synchronized void putChannel(final long channelID, final Channel channel)
-   {
+   public synchronized void putChannel(final long channelID, final Channel channel) {
       channels.put(channelID, channel);
    }
 
-   public void fail(final ActiveMQException me, String scaleDownTargetNodeID)
-   {
-      synchronized (failLock)
-      {
-         if (destroyed)
-         {
+   public void fail(final ActiveMQException me, String scaleDownTargetNodeID) {
+      synchronized (failLock) {
+         if (destroyed) {
             return;
          }
 
@@ -210,13 +197,10 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
 
       ActiveMQClientLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType());
 
-
-      try
-      {
+      try {
          transportConnection.forceClose();
       }
-      catch (Throwable e)
-      {
+      catch (Throwable e) {
          ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e);
       }
 
@@ -227,18 +211,14 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
 
       internalClose();
 
-      for (Channel channel : channels.values())
-      {
+      for (Channel channel : channels.values()) {
          channel.returnBlocking(me);
       }
    }
 
-   public void destroy()
-   {
-      synchronized (failLock)
-      {
-         if (destroyed)
-         {
+   public void destroy() {
+      synchronized (failLock) {
+         if (destroyed) {
             return;
          }
 
@@ -250,13 +230,11 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
       callClosingListeners();
    }
 
-   public void disconnect(final boolean criticalError)
-   {
+   public void disconnect(final boolean criticalError) {
       disconnect(null, criticalError);
    }
 
-   public void disconnect(String scaleDownNodeID, final boolean criticalError)
-   {
+   public void disconnect(String scaleDownNodeID, final boolean criticalError) {
       Channel channel0 = getChannel(ChannelImpl.CHANNEL_ID.PING.id, -1);
 
       // And we remove all channels from the connection, this ensures no more packets will be processed after this
@@ -265,12 +243,10 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
 
       Set<Channel> allChannels = new HashSet<Channel>(channels.values());
 
-      if (!criticalError)
-      {
+      if (!criticalError) {
          removeAllChannels();
       }
-      else
-      {
+      else {
          // We can't hold a lock if a critical error is happening...
          // as other threads will be holding the lock while hanging on IO
          channels.clear();
@@ -278,100 +254,80 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
 
       // Now we are 100% sure that no more packets will be processed we can flush then send the disconnect
 
-      if (!criticalError)
-      {
-         for (Channel channel : allChannels)
-         {
+      if (!criticalError) {
+         for (Channel channel : allChannels) {
             channel.flushConfirmations();
          }
       }
       Packet disconnect;
 
-      if (channel0.supports(PacketImpl.DISCONNECT_V2))
-      {
+      if (channel0.supports(PacketImpl.DISCONNECT_V2)) {
          disconnect = new DisconnectMessage_V2(nodeID, scaleDownNodeID);
       }
-      else
-      {
+      else {
          disconnect = new DisconnectMessage(nodeID);
       }
       channel0.sendAndFlush(disconnect);
    }
 
-   public long generateChannelID()
-   {
+   public long generateChannelID() {
       return idGenerator.generateID();
    }
 
-   public synchronized void syncIDGeneratorSequence(final long id)
-   {
-      if (!idGeneratorSynced)
-      {
+   public synchronized void syncIDGeneratorSequence(final long id) {
+      if (!idGeneratorSynced) {
          idGenerator = new SimpleIDGenerator(id);
 
          idGeneratorSynced = true;
       }
    }
 
-   public long getIDGeneratorSequence()
-   {
+   public long getIDGeneratorSequence() {
       return idGenerator.getCurrentID();
    }
 
-   public Object getTransferLock()
-   {
+   public Object getTransferLock() {
       return transferLock;
    }
 
-   public boolean isClient()
-   {
+   public boolean isClient() {
       return client;
    }
 
-   public boolean isDestroyed()
-   {
+   public boolean isDestroyed() {
       return destroyed;
    }
 
-   public long getBlockingCallTimeout()
-   {
+   public long getBlockingCallTimeout() {
       return blockingCallTimeout;
    }
 
    @Override
-   public long getBlockingCallFailoverTimeout()
-   {
+   public long getBlockingCallFailoverTimeout() {
       return blockingCallFailoverTimeout;
    }
 
    //We flush any confirmations on the connection - this prevents idle bridges for example
    //sitting there with many unacked messages
-   public void flush()
-   {
-      synchronized (transferLock)
-      {
-         for (Channel channel : channels.values())
-         {
+   public void flush() {
+      synchronized (transferLock) {
+         for (Channel channel : channels.values()) {
             channel.flushConfirmations();
          }
       }
    }
 
-   public ActiveMQPrincipal getDefaultActiveMQPrincipal()
-   {
+   public ActiveMQPrincipal getDefaultActiveMQPrincipal() {
       return getTransportConnection().getDefaultActiveMQPrincipal();
    }
 
    // Buffer Handler implementation
    // ----------------------------------------------------
-   public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer)
-   {
-      try
-      {
+   public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) {
+      try {
          final Packet packet = packetDecoder.decode(buffer);
 
-         if (isTrace)
-         {
+         if (isTrace) {
             ActiveMQClientLogger.LOGGER.trace("handling packet " + packet);
          }
 
@@ -380,58 +336,47 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
 
          super.bufferReceived(connectionID, buffer);
       }
-      catch (Exception e)
-      {
+      catch (Exception e) {
          ActiveMQClientLogger.LOGGER.errorDecodingPacket(e);
       }
    }
 
-   private void doBufferReceived(final Packet packet)
-   {
-      if (ChannelImpl.invokeInterceptors(packet, incomingInterceptors, this) != null)
-      {
+   private void doBufferReceived(final Packet packet) {
+      if (ChannelImpl.invokeInterceptors(packet, incomingInterceptors, this) != null) {
          return;
       }
 
-      synchronized (transferLock)
-      {
+      synchronized (transferLock) {
          final Channel channel = channels.get(packet.getChannelID());
 
-         if (channel != null)
-         {
+         if (channel != null) {
             channel.handlePacket(packet);
          }
       }
    }
 
-   protected void removeAllChannels()
-   {
+   protected void removeAllChannels() {
       // We get the transfer lock first - this ensures no packets are being processed AND
       // it's guaranteed no more packets will be processed once this method is complete
-      synchronized (transferLock)
-      {
+      synchronized (transferLock) {
          channels.clear();
       }
    }
 
-   private void internalClose()
-   {
+   private void internalClose() {
       // We close the underlying transport connection
       getTransportConnection().close();
 
-      for (Channel channel : channels.values())
-      {
+      for (Channel channel : channels.values()) {
          channel.close();
       }
    }
 
-   public void setClientID(String cID)
-   {
+   public void setClientID(String cID) {
       clientID = cID;
    }
 
-   public String getClientID()
-   {
+   public String getClientID() {
       return clientID;
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java
index ab2a6ed..f99b465 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java
@@ -21,8 +21,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 
-public class ActiveMQExceptionMessage extends PacketImpl
-{
+public class ActiveMQExceptionMessage extends PacketImpl {
 
    private ActiveMQException exception;
 
@@ -30,41 +29,35 @@ public class ActiveMQExceptionMessage extends PacketImpl
 
    // Constructors --------------------------------------------------
 
-   public ActiveMQExceptionMessage(final ActiveMQException exception)
-   {
+   public ActiveMQExceptionMessage(final ActiveMQException exception) {
       super(EXCEPTION);
 
       this.exception = exception;
    }
 
-   public ActiveMQExceptionMessage()
-   {
+   public ActiveMQExceptionMessage() {
       super(EXCEPTION);
    }
 
    // Public --------------------------------------------------------
 
    @Override
-   public boolean isResponse()
-   {
+   public boolean isResponse() {
       return true;
    }
 
-   public ActiveMQException getException()
-   {
+   public ActiveMQException getException() {
       return exception;
    }
 
    @Override
-   public void encodeRest(final ActiveMQBuffer buffer)
-   {
+   public void encodeRest(final ActiveMQBuffer buffer) {
       buffer.writeInt(exception.getType().getCode());
       buffer.writeNullableString(exception.getMessage());
    }
 
    @Override
-   public void decodeRest(final ActiveMQBuffer buffer)
-   {
+   public void decodeRest(final ActiveMQBuffer buffer) {
       int code = buffer.readInt();
       String msg = buffer.readNullableString();
 
@@ -72,14 +65,12 @@ public class ActiveMQExceptionMessage extends PacketImpl
    }
 
    @Override
-   public String toString()
-   {
+   public String toString() {
       return getParentString() + ", exception= " + exception + "]";
    }
 
    @Override
-   public int hashCode()
-   {
+   public int hashCode() {
       final int prime = 31;
       int result = super.hashCode();
       result = prime * result + ((exception == null) ? 0 : exception.hashCode());
@@ -87,30 +78,23 @@ public class ActiveMQExceptionMessage extends PacketImpl
    }
 
    @Override
-   public boolean equals(Object obj)
-   {
-      if (this == obj)
-      {
+   public boolean equals(Object obj) {
+      if (this == obj) {
          return true;
       }
-      if (!super.equals(obj))
-      {
+      if (!super.equals(obj)) {
          return false;
       }
-      if (!(obj instanceof ActiveMQExceptionMessage))
-      {
+      if (!(obj instanceof ActiveMQExceptionMessage)) {
          return false;
       }
-      ActiveMQExceptionMessage other = (ActiveMQExceptionMessage)obj;
-      if (exception == null)
-      {
-         if (other.exception != null)
-         {
+      ActiveMQExceptionMessage other = (ActiveMQExceptionMessage) obj;
+      if (exception == null) {
+         if (other.exception != null) {
             return false;
          }
       }
-      else if (!exception.equals(other.exception))
-      {
+      else if (!exception.equals(other.exception)) {
          return false;
       }
       return true;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverMessage.java
index fcc4b5b..c618e0b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverMessage.java
@@ -19,35 +19,30 @@ package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 
-public class CheckFailoverMessage extends PacketImpl
-{
+public class CheckFailoverMessage extends PacketImpl {
+
    private String nodeID;
 
-   public CheckFailoverMessage(final String nodeID)
-   {
+   public CheckFailoverMessage(final String nodeID) {
       super(CHECK_FOR_FAILOVER);
       this.nodeID = nodeID;
    }
 
-   public CheckFailoverMessage()
-   {
+   public CheckFailoverMessage() {
       super(CHECK_FOR_FAILOVER);
    }
 
    @Override
-   public void encodeRest(ActiveMQBuffer buffer)
-   {
+   public void encodeRest(ActiveMQBuffer buffer) {
       buffer.writeNullableString(nodeID);
    }
 
    @Override
-   public void decodeRest(ActiveMQBuffer buffer)
-   {
+   public void decodeRest(ActiveMQBuffer buffer) {
       nodeID = buffer.readNullableString();
    }
 
-   public String getNodeID()
-   {
+   public String getNodeID() {
       return nodeID;
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java
index be29fdb..e09f282 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java
@@ -16,45 +16,38 @@
  */
 package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
 
-
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 
-public class CheckFailoverReplyMessage extends PacketImpl
-{
+public class CheckFailoverReplyMessage extends PacketImpl {
+
    private boolean okToFailover;
 
-   public CheckFailoverReplyMessage(boolean okToFailover)
-   {
+   public CheckFailoverReplyMessage(boolean okToFailover) {
       super(CHECK_FOR_FAILOVER_REPLY);
       this.okToFailover = okToFailover;
    }
 
-   public CheckFailoverReplyMessage()
-   {
+   public CheckFailoverReplyMessage() {
       super(CHECK_FOR_FAILOVER_REPLY);
    }
 
    @Override
-   public boolean isResponse()
-   {
+   public boolean isResponse() {
       return true;
    }
 
    @Override
-   public void encodeRest(ActiveMQBuffer buffer)
-   {
+   public void encodeRest(ActiveMQBuffer buffer) {
       buffer.writeBoolean(okToFailover);
    }
 
    @Override
-   public void decodeRest(ActiveMQBuffer buffer)
-   {
+   public void decodeRest(ActiveMQBuffer buffer) {
       okToFailover = buffer.readBoolean();
    }
 
-   public boolean isOkToFailover()
-   {
+   public boolean isOkToFailover() {
       return okToFailover;
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java
index 13ae08f..f019576 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java
@@ -21,8 +21,8 @@ import org.apache.activemq.artemis.api.core.Pair;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 
-public class ClusterTopologyChangeMessage extends PacketImpl
-{
+public class ClusterTopologyChangeMessage extends PacketImpl {
+
    protected boolean exit;
 
    protected String nodeID;
@@ -35,8 +35,9 @@ public class ClusterTopologyChangeMessage extends PacketImpl
 
    // Constructors --------------------------------------------------
 
-   public ClusterTopologyChangeMessage(final String nodeID, final Pair<TransportConfiguration, TransportConfiguration> pair, final boolean last)
-   {
+   public ClusterTopologyChangeMessage(final String nodeID,
+                                       final Pair<TransportConfiguration, TransportConfiguration> pair,
+                                       final boolean last) {
       super(CLUSTER_TOPOLOGY);
 
       this.nodeID = nodeID;
@@ -48,8 +49,7 @@ public class ClusterTopologyChangeMessage extends PacketImpl
       this.exit = false;
    }
 
-   public ClusterTopologyChangeMessage(final String nodeID)
-   {
+   public ClusterTopologyChangeMessage(final String nodeID) {
       super(CLUSTER_TOPOLOGY);
 
       this.exit = true;
@@ -57,8 +57,7 @@ public class ClusterTopologyChangeMessage extends PacketImpl
       this.nodeID = nodeID;
    }
 
-   public ClusterTopologyChangeMessage()
-   {
+   public ClusterTopologyChangeMessage() {
       super(CLUSTER_TOPOLOGY);
    }
 
@@ -67,54 +66,43 @@ public class ClusterTopologyChangeMessage extends PacketImpl
    /**
     * @param clusterTopologyV2
     */
-   public ClusterTopologyChangeMessage(byte clusterTopologyV2)
-   {
+   public ClusterTopologyChangeMessage(byte clusterTopologyV2) {
       super(clusterTopologyV2);
    }
 
-   public String getNodeID()
-   {
+   public String getNodeID() {
       return nodeID;
    }
 
-   public Pair<TransportConfiguration, TransportConfiguration> getPair()
-   {
+   public Pair<TransportConfiguration, TransportConfiguration> getPair() {
       return pair;
    }
 
-   public boolean isLast()
-   {
+   public boolean isLast() {
       return last;
    }
 
-   public boolean isExit()
-   {
+   public boolean isExit() {
       return exit;
    }
 
    @Override
-   public void encodeRest(final ActiveMQBuffer buffer)
-   {
+   public void encodeRest(final ActiveMQBuffer buffer) {
       buffer.writeBoolean(exit);
       buffer.writeString(nodeID);
-      if (!exit)
-      {
-         if (pair.getA() != null)
-         {
+      if (!exit) {
+         if (pair.getA() != null) {
             buffer.writeBoolean(true);
             pair.getA().encode(buffer);
          }
-         else
-         {
+         else {
             buffer.writeBoolean(false);
          }
-         if (pair.getB() != null)
-         {
+         if (pair.getB() != null) {
             buffer.writeBoolean(true);
             pair.getB().encode(buffer);
          }
-         else
-         {
+         else {
             buffer.writeBoolean(false);
          }
          buffer.writeBoolean(last);
@@ -122,32 +110,26 @@ public class ClusterTopologyChangeMessage extends PacketImpl
    }
 
    @Override
-   public void decodeRest(final ActiveMQBuffer buffer)
-   {
+   public void decodeRest(final ActiveMQBuffer buffer) {
       exit = buffer.readBoolean();
       nodeID = buffer.readString();
-      if (!exit)
-      {
+      if (!exit) {
          boolean hasLive = buffer.readBoolean();
          TransportConfiguration a;
-         if (hasLive)
-         {
+         if (hasLive) {
             a = new TransportConfiguration();
             a.decode(buffer);
          }
-         else
-         {
+         else {
             a = null;
          }
          boolean hasBackup = buffer.readBoolean();
          TransportConfiguration b;
-         if (hasBackup)
-         {
+         if (hasBackup) {
             b = new TransportConfiguration();
             b.decode(buffer);
          }
-         else
-         {
+         else {
             b = null;
          }
          pair = new Pair<TransportConfiguration, TransportConfiguration>(a, b);
@@ -156,8 +138,7 @@ public class ClusterTopologyChangeMessage extends PacketImpl
    }
 
    @Override
-   public int hashCode()
-   {
+   public int hashCode() {
       final int prime = 31;
       int result = super.hashCode();
       result = prime * result + (exit ? 1231 : 1237);
@@ -168,49 +149,37 @@ public class ClusterTopologyChangeMessage extends PacketImpl
    }
 
    @Override
-   public boolean equals(Object obj)
-   {
-      if (this == obj)
-      {
+   public boolean equals(Object obj) {
+      if (this == obj) {
          return true;
       }
-      if (!super.equals(obj))
-      {
+      if (!super.equals(obj)) {
          return false;
       }
-      if (!(obj instanceof ClusterTopologyChangeMessage))
-      {
+      if (!(obj instanceof ClusterTopologyChangeMessage)) {
          return false;
       }
       ClusterTopologyChangeMessage other = (ClusterTopologyChangeMessage) obj;
-      if (exit != other.exit)
-      {
+      if (exit != other.exit) {
          return false;
       }
-      if (last != other.last)
-      {
+      if (last != other.last) {
          return false;
       }
-      if (nodeID == null)
-      {
-         if (other.nodeID != null)
-         {
+      if (nodeID == null) {
+         if (other.nodeID != null) {
             return false;
          }
       }
-      else if (!nodeID.equals(other.nodeID))
-      {
+      else if (!nodeID.equals(other.nodeID)) {
          return false;
       }
-      if (pair == null)
-      {
-         if (other.pair != null)
-         {
+      if (pair == null) {
+         if (other.pair != null) {
             return false;
          }
       }
-      else if (!pair.equals(other.pair))
-      {
+      else if (!pair.equals(other.pair)) {
          return false;
       }
       return true;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java
index ca78ec0..76860e1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java
@@ -23,14 +23,16 @@ import org.apache.activemq.artemis.api.core.TransportConfiguration;
 /**
  * Clebert Suconic
  */
-public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessage
-{
+public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessage {
+
    protected long uniqueEventID;
    protected String backupGroupName;
 
-   public ClusterTopologyChangeMessage_V2(final long uniqueEventID, final String nodeID, final String backupGroupName,
-                                          final Pair<TransportConfiguration, TransportConfiguration> pair, final boolean last)
-   {
+   public ClusterTopologyChangeMessage_V2(final long uniqueEventID,
+                                          final String nodeID,
+                                          final String backupGroupName,
+                                          final Pair<TransportConfiguration, TransportConfiguration> pair,
+                                          final boolean last) {
       super(CLUSTER_TOPOLOGY_V2);
 
       this.nodeID = nodeID;
@@ -46,8 +48,7 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag
       this.backupGroupName = backupGroupName;
    }
 
-   public ClusterTopologyChangeMessage_V2(final long uniqueEventID, final String nodeID)
-   {
+   public ClusterTopologyChangeMessage_V2(final long uniqueEventID, final String nodeID) {
       super(CLUSTER_TOPOLOGY_V2);
 
       this.exit = true;
@@ -57,53 +58,43 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag
       this.uniqueEventID = uniqueEventID;
    }
 
-   public ClusterTopologyChangeMessage_V2()
-   {
+   public ClusterTopologyChangeMessage_V2() {
       super(CLUSTER_TOPOLOGY_V2);
    }
 
-   public ClusterTopologyChangeMessage_V2(byte clusterTopologyV3)
-   {
+   public ClusterTopologyChangeMessage_V2(byte clusterTopologyV3) {
       super(clusterTopologyV3);
    }
 
    /**
     * @return the uniqueEventID
     */
-   public long getUniqueEventID()
-   {
+   public long getUniqueEventID() {
       return uniqueEventID;
    }
 
-   public String getBackupGroupName()
-   {
+   public String getBackupGroupName() {
       return backupGroupName;
    }
 
    @Override
-   public void encodeRest(final ActiveMQBuffer buffer)
-   {
+   public void encodeRest(final ActiveMQBuffer buffer) {
       buffer.writeBoolean(exit);
       buffer.writeString(nodeID);
       buffer.writeLong(uniqueEventID);
-      if (!exit)
-      {
-         if (pair.getA() != null)
-         {
+      if (!exit) {
+         if (pair.getA() != null) {
             buffer.writeBoolean(true);
             pair.getA().encode(buffer);
          }
-         else
-         {
+         else {
             buffer.writeBoolean(false);
          }
-         if (pair.getB() != null)
-         {
+         if (pair.getB() != null) {
             buffer.writeBoolean(true);
             pair.getB().encode(buffer);
          }
-         else
-         {
+         else {
             buffer.writeBoolean(false);
          }
          buffer.writeBoolean(last);
@@ -112,47 +103,39 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag
    }
 
    @Override
-   public void decodeRest(final ActiveMQBuffer buffer)
-   {
+   public void decodeRest(final ActiveMQBuffer buffer) {
       exit = buffer.readBoolean();
       nodeID = buffer.readString();
       uniqueEventID = buffer.readLong();
-      if (!exit)
-      {
+      if (!exit) {
          boolean hasLive = buffer.readBoolean();
          TransportConfiguration a;
-         if (hasLive)
-         {
+         if (hasLive) {
             a = new TransportConfiguration();
             a.decode(buffer);
          }
-         else
-         {
+         else {
             a = null;
          }
          boolean hasBackup = buffer.readBoolean();
          TransportConfiguration b;
-         if (hasBackup)
-         {
+         if (hasBackup) {
             b = new TransportConfiguration();
             b.decode(buffer);
          }
-         else
-         {
+         else {
             b = null;
          }
          pair = new Pair<TransportConfiguration, TransportConfiguration>(a, b);
          last = buffer.readBoolean();
       }
-      if (buffer.readableBytes() > 0)
-      {
+      if (buffer.readableBytes() > 0) {
          backupGroupName = buffer.readNullableString();
       }
    }
 
    @Override
-   public int hashCode()
-   {
+   public int hashCode() {
       final int prime = 31;
       int result = super.hashCode();
       result = prime * result + ((backupGroupName == null) ? 0 : backupGroupName.hashCode());
@@ -161,34 +144,26 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag
    }
 
    @Override
-   public boolean equals(Object obj)
-   {
-      if (this == obj)
-      {
+   public boolean equals(Object obj) {
+      if (this == obj) {
          return true;
       }
-      if (!super.equals(obj))
-      {
+      if (!super.equals(obj)) {
          return false;
       }
-      if (!(obj instanceof ClusterTopologyChangeMessage_V2))
-      {
+      if (!(obj instanceof ClusterTopologyChangeMessage_V2)) {
          return false;
       }
       ClusterTopologyChangeMessage_V2 other = (ClusterTopologyChangeMessage_V2) obj;
-      if (uniqueEventID != other.uniqueEventID)
-      {
+      if (uniqueEventID != other.uniqueEventID) {
          return false;
       }
-      if (backupGroupName == null)
-      {
-         if (other.backupGroupName != null)
-         {
+      if (backupGroupName == null) {
+         if (other.backupGroupName != null) {
             return false;
          }
       }
-      else if (!backupGroupName.equals(other.backupGroupName))
-      {
+      else if (!backupGroupName.equals(other.backupGroupName)) {
          return false;
       }
       return true;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java
index 0614344..3942708 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java
@@ -20,13 +20,16 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.Pair;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 
-public class ClusterTopologyChangeMessage_V3 extends ClusterTopologyChangeMessage_V2
-{
+public class ClusterTopologyChangeMessage_V3 extends ClusterTopologyChangeMessage_V2 {
+
    private String scaleDownGroupName;
 
-   public ClusterTopologyChangeMessage_V3(final long uniqueEventID, final String nodeID, final String backupGroupName, final String scaleDownGroupName,
-                                          final Pair<TransportConfiguration, TransportConfiguration> pair, final boolean last)
-   {
+   public ClusterTopologyChangeMessage_V3(final long uniqueEventID,
+                                          final String nodeID,
+                                          final String backupGroupName,
+                                          final String scaleDownGroupName,
+                                          final Pair<TransportConfiguration, TransportConfiguration> pair,
+                                          final boolean last) {
       super(CLUSTER_TOPOLOGY_V3);
 
       this.nodeID = nodeID;
@@ -44,33 +47,28 @@ public class ClusterTopologyChangeMessage_V3 extends ClusterTopologyChangeMessag
       this.scaleDownGroupName = scaleDownGroupName;
    }
 
-   public ClusterTopologyChangeMessage_V3()
-   {
+   public ClusterTopologyChangeMessage_V3() {
       super(CLUSTER_TOPOLOGY_V3);
    }
 
-   public String getScaleDownGroupName()
-   {
+   public String getScaleDownGroupName() {
       return scaleDownGroupName;
    }
 
    @Override
-   public void encodeRest(final ActiveMQBuffer buffer)
-   {
+   public void encodeRest(final ActiveMQBuffer buffer) {
       super.encodeRest(buffer);
       buffer.writeNullableString(scaleDownGroupName);
    }
 
    @Override
-   public void decodeRest(final ActiveMQBuffer buffer)
-   {
+   public void decodeRest(final ActiveMQBuffer buffer) {
       super.decodeRest(buffer);
       scaleDownGroupName = buffer.readNullableString();
    }
 
    @Override
-   public int hashCode()
-   {
+   public int hashCode() {
       final int prime = 31;
       int result = super.hashCode();
       result = prime * result + ((scaleDownGroupName == null) ? 0 : scaleDownGroupName.hashCode());
@@ -78,30 +76,23 @@ public class ClusterTopologyChangeMessage_V3 extends ClusterTopologyChangeMessag
    }
 
    @Override
-   public boolean equals(Object obj)
-   {
-      if (this == obj)
-      {
+   public boolean equals(Object obj) {
+      if (this == obj) {
          return true;
       }
-      if (!super.equals(obj))
-      {
+      if (!super.equals(obj)) {
          return false;
       }
-      if (!(obj instanceof ClusterTopologyChangeMessage_V3))
-      {
+      if (!(obj instanceof ClusterTopologyChangeMessage_V3)) {
          return false;
       }
       ClusterTopologyChangeMessage_V3 other = (ClusterTopologyChangeMessage_V3) obj;
-      if (scaleDownGroupName == null)
-      {
-         if (other.scaleDownGroupName != null)
-         {
+      if (scaleDownGroupName == null) {
+         if (other.scaleDownGroupName != null) {
             return false;
          }
       }
-      else if (!scaleDownGroupName.equals(other.scaleDownGroupName))
-      {
+      else if (!scaleDownGroupName.equals(other.scaleDownGroupName)) {
          return false;
       }
       return true;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java
index e385842..5f65fbe 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java
@@ -20,8 +20,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 
-public class CreateQueueMessage extends PacketImpl
-{
+public class CreateQueueMessage extends PacketImpl {
 
    private SimpleString address;
 
@@ -40,8 +39,7 @@ public class CreateQueueMessage extends PacketImpl
                              final SimpleString filterString,
                              final boolean durable,
                              final boolean temporary,
-                             final boolean requiresResponse)
-   {
+                             final boolean requiresResponse) {
       this();
 
       this.address = address;
@@ -52,16 +50,14 @@ public class CreateQueueMessage extends PacketImpl
       this.requiresResponse = requiresResponse;
    }
 
-   public CreateQueueMessage()
-   {
+   public CreateQueueMessage() {
       super(CREATE_QUEUE);
    }
 
    // Public --------------------------------------------------------
 
    @Override
-   public String toString()
-   {
+   public String toString() {
       StringBuffer buff = new StringBuffer(getParentString());
       buff.append(", address=" + address);
       buff.append(", queueName=" + queueName);
@@ -72,64 +68,52 @@ public class CreateQueueMessage extends PacketImpl
       return buff.toString();
    }
 
-   public SimpleString getAddress()
-   {
+   public SimpleString getAddress() {
       return address;
    }
 
-   public SimpleString getQueueName()
-   {
+   public SimpleString getQueueName() {
       return queueName;
    }
 
-   public SimpleString getFilterString()
-   {
+   public SimpleString getFilterString() {
       return filterString;
    }
 
-   public boolean isDurable()
-   {
+   public boolean isDurable() {
       return durable;
    }
 
-   public boolean isTemporary()
-   {
+   public boolean isTemporary() {
       return temporary;
    }
 
-   public boolean isRequiresResponse()
-   {
+   public boolean isRequiresResponse() {
       return requiresResponse;
    }
 
-   public void setAddress(SimpleString address)
-   {
+   public void setAddress(SimpleString address) {
       this.address = address;
    }
 
-   public void setQueueName(SimpleString queueName)
-   {
+   public void setQueueName(SimpleString queueName) {
       this.queueName = queueName;
    }
 
-   public void setFilterString(SimpleString filterString)
-   {
+   public void setFilterString(SimpleString filterString) {
       this.filterString = filterString;
    }
 
-   public void setDurable(boolean durable)
-   {
+   public void setDurable(boolean durable) {
       this.durable = durable;
    }
 
-   public void setTemporary(boolean temporary)
-   {
+   public void setTemporary(boolean temporary) {
       this.temporary = temporary;
    }
 
    @Override
-   public void encodeRest(final ActiveMQBuffer buffer)
-   {
+   public void encodeRest(final ActiveMQBuffer buffer) {
       buffer.writeSimpleString(address);
       buffer.writeSimpleString(queueName);
       buffer.writeNullableSimpleString(filterString);
@@ -139,8 +123,7 @@ public class CreateQueueMessage extends PacketImpl
    }
 
    @Override
-   public void decodeRest(final ActiveMQBuffer buffer)
-   {
+   public void decodeRest(final ActiveMQBuffer buffer) {
       address = buffer.readSimpleString();
       queueName = buffer.readSimpleString();
       filterString = buffer.readNullableSimpleString();
@@ -150,8 +133,7 @@ public class CreateQueueMessage extends PacketImpl
    }
 
    @Override
-   public int hashCode()
-   {
+   public int hashCode() {
       final int prime = 31;
       int result = super.hashCode();
       result = prime * result + ((address == null) ? 0 : address.hashCode());
@@ -164,17 +146,15 @@ public class CreateQueueMessage extends PacketImpl
    }
 
    @Override
-   public boolean equals(Object obj)
-   {
+   public boolean equals(Object obj) {
       if (this == obj)
          return true;
       if (!super.equals(obj))
          return false;
       if (!(obj instanceof CreateQueueMessage))
          return false;
-      CreateQueueMessage other = (CreateQueueMessage)obj;
-      if (address == null)
-      {
+      CreateQueueMessage other = (CreateQueueMessage) obj;
+      if (address == null) {
          if (other.address != null)
             return false;
       }
@@ -182,15 +162,13 @@ public class CreateQueueMessage extends PacketImpl
          return false;
       if (durable != other.durable)
          return false;
-      if (filterString == null)
-      {
+      if (filterString == null) {
          if (other.filterString != null)
             return false;
       }
       else if (!filterString.equals(other.filterString))
          return false;
-      if (queueName == null)
-      {
+      if (queueName == null) {
          if (other.queueName != null)
             return false;
       }


Mime
View raw message