Examples of DisconnectMessage


Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

      {
         final byte type = packet.getType();

         if (type == PacketImpl.DISCONNECT)
         {
            final DisconnectMessage msg = (DisconnectMessage)packet;
           
            closeExecutor.execute(new Runnable()
            {
               // Must be executed on new thread since cannot block the netty thread for a long time and fail can
               // cause reconnect loop
               public void run()
               {
                  SimpleString nodeID = msg.getNodeID();
                  if (nodeID != null)
                  {
                     serverLocator.notifyNodeDown(msg.getNodeID().toString());
                  }

                  conn.fail(new HornetQException(msg.isFailoverOnServerShutdown() ? HornetQException.NOT_CONNECTED
                                                                                 : HornetQException.DISCONNECTED,
                                                 "The connection was disconnected because of server shutdown"));

               }
            });
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

      for (Channel channel: allChannels)
      {
         channel.flushConfirmations();
      }

      Packet disconnect = new DisconnectMessage(nodeID);
      channel0.sendAndFlush(disconnect);
   }
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

      {
         final byte type = packet.getType();

         if (type == PacketImpl.DISCONNECT)
         {
            final DisconnectMessage msg = (DisconnectMessage)packet;
           
            closeExecutor.execute(new Runnable()
            {
               // Must be executed on new thread since cannot block the netty thread for a long time and fail can
               // cause reconnect loop
               public void run()
               {
                  SimpleString nodeID = msg.getNodeID();
                  if (nodeID != null)
                  {
                     serverLocator.notifyNodeDown(msg.getNodeID().toString());
                  }

                  conn.fail(new HornetQException(HornetQException.DISCONNECTED,
                                                 "The connection was disconnected because of server shutdown"));
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

            packet = new Ping();
            break;
         }
         case DISCONNECT:
         {
            packet = new DisconnectMessage();
            break;
         }
         case EXCEPTION:
         {
            packet = new HornetQExceptionMessage();
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

      {
         final byte type = packet.getType();

         if (type == PacketImpl.DISCONNECT)
         {
            final DisconnectMessage msg = (DisconnectMessage)packet;

            SimpleString nodeID = msg.getNodeID();

            if (HornetQClientLogger.LOGGER.isTraceEnabled())
            {
               HornetQClientLogger.LOGGER.trace("Disconnect being called on client:" + msg +
                                                  " server locator = " +
                                                  serverLocator +
                                                  " notifying node " +
                                                  nodeID +
                                                  " as down", new Exception("trace"));
            }

            if (nodeID != null)
            {
               serverLocator.notifyNodeDown(System.currentTimeMillis(), msg.getNodeID().toString());
            }

            closeExecutor.execute(new CloseRunnable(conn));
         }
         else if (type == PacketImpl.CLUSTER_TOPOLOGY)
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

            packet = new Ping();
            break;
         }
         case DISCONNECT:
         {
            packet = new DisconnectMessage();
            break;
         }
         case EXCEPTION:
         {
            packet = new HornetQExceptionMessage();
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

      {
         final byte type = packet.getType();

         if (type == PacketImpl.DISCONNECT)
         {
            final DisconnectMessage msg = (DisconnectMessage)packet;

            SimpleString nodeID = msg.getNodeID();

            if (ClientSessionFactoryImpl.log.isTraceEnabled())
            {
               ClientSessionFactoryImpl.log.trace("Disconnect being called on client:" + msg +
                                                  " server locator = " +
                                                  serverLocator +
                                                  " notifying node " +
                                                  nodeID +
                                                  " as down", new Exception("trace"));
            }

            if (nodeID != null)
            {
               serverLocator.notifyNodeDown(System.currentTimeMillis(), msg.getNodeID().toString());
            }

            closeExecutor.execute(new Runnable()
            {
               // Must be executed on new thread since cannot block the netty thread for a long time and fail can
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

         {
            channel.flushConfirmations();
         }
      }

      Packet disconnect = new DisconnectMessage(nodeID);
      channel0.sendAndFlush(disconnect);
   }
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

      {
         final byte type = packet.getType();

         if (type == PacketImpl.DISCONNECT)
         {
            final DisconnectMessage msg = (DisconnectMessage)packet;

            SimpleString nodeID = msg.getNodeID();

            if (HornetQLogger.LOGGER.isTraceEnabled())
            {
               HornetQLogger.LOGGER.trace("Disconnect being called on client:" + msg +
                                                  " server locator = " +
                                                  serverLocator +
                                                  " notifying node " +
                                                  nodeID +
                                                  " as down", new Exception("trace"));
            }

            if (nodeID != null)
            {
               serverLocator.notifyNodeDown(System.currentTimeMillis(), msg.getNodeID().toString());
            }

            closeExecutor.execute(new CloseRunnable(conn));
         }
         else if (type == PacketImpl.CLUSTER_TOPOLOGY)
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.wireformat.DisconnectMessage

      {
         final byte type = packet.getType();

         if (type == PacketImpl.DISCONNECT)
         {
            final DisconnectMessage msg = (DisconnectMessage)packet;

            SimpleString nodeID = msg.getNodeID();

            if (HornetQClientLogger.LOGGER.isTraceEnabled())
            {
               HornetQClientLogger.LOGGER.trace("Disconnect being called on client:" + msg +
                                                   " server locator = " +
                                                   serverLocator +
                                                   " notifying node " +
                                                   nodeID +
                                                   " as down", new Exception("trace"));
            }

            if (nodeID != null)
            {
               serverLocator.notifyNodeDown(System.currentTimeMillis(), msg.getNodeID().toString());
            }

            closeExecutor.execute(new CloseRunnable(conn));
         }
         else if (type == PacketImpl.CLUSTER_TOPOLOGY)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.