Package org.hornetq.core.remoting

Examples of org.hornetq.core.remoting.CloseListener


                                                TimeUnit.MILLISECONDS));
      Assert.assertEquals(1, server.getConnectionCount());

      RemotingConnection remotingConnection = server.getRemotingService().getConnections().iterator().next();
      final CountDownLatch serverCloseLatch = new CountDownLatch(1);
      remotingConnection.addCloseListener(new CloseListener()
      {
         public void connectionClosed()
         {
            serverCloseLatch.countDown();
         }
View Full Code Here


         // the remoting connection
         // dies. It does not mean it will get deleted automatically when the
         // session is closed.
         // It is up to the user to delete the queue when finished with it

         CloseListener closeListener = new CloseListener()
         {
            public void connectionClosed()
            {
               try
               {
View Full Code Here

      WeakReference<Connection> wr = new WeakReference<Connection>(conn);

      Assert.assertEquals(1, server.getRemotingService().getConnections().size());
      final CountDownLatch latch = new CountDownLatch(1);
      Iterator<RemotingConnection> connectionIterator = server.getRemotingService().getConnections().iterator();
      connectionIterator.next().addCloseListener(new CloseListener()
      {
         public void connectionClosed()
         {
            latch.countDown();
         }
View Full Code Here

      final CountDownLatch latch = new CountDownLatch(3);
      Iterator<RemotingConnection> connectionIterator = server.getRemotingService().getConnections().iterator();
      while (connectionIterator.hasNext())
      {
         RemotingConnection remotingConnection = connectionIterator.next();
         remotingConnection.addCloseListener(new CloseListener()
         {
            public void connectionClosed()
            {
               latch.countDown();
            }
View Full Code Here

      final CountDownLatch latch = new CountDownLatch(3);
      Iterator<RemotingConnection> connectionIterator = server.getRemotingService().getConnections().iterator();
      while (connectionIterator.hasNext())
      {
         RemotingConnection remotingConnection = connectionIterator.next();
         remotingConnection.addCloseListener(new CloseListener()
         {
            public void connectionClosed()
            {
               latch.countDown();
            }
View Full Code Here

                                                                  .getConnections()
                                                                  .iterator()
                                                                  .next();

      final CountDownLatch latch = new CountDownLatch(1);
      conn.addCloseListener(new CloseListener()
      {
         public void connectionClosed()
         {
            latch.countDown();
         }
View Full Code Here

                                                TimeUnit.MILLISECONDS));
      Assert.assertEquals(1, server.getConnectionCount());

      RemotingConnection remotingConnection = server.getRemotingService().getConnections().iterator().next();
      final CountDownLatch serverCloseLatch = new CountDownLatch(1);
      remotingConnection.addCloseListener(new CloseListener()
      {
         public void connectionClosed()
         {
            serverCloseLatch.countDown();
         }
View Full Code Here

            if (acceptorUsed.getClusterConnection() != null)
            {
               acceptorUsed.getClusterConnection().addClusterTopologyListener(listener);

               rc.addCloseListener(new CloseListener()
               {
                  public void connectionClosed()
                  {
                     acceptorUsed.getClusterConnection().removeClusterTopologyListener(listener);
                  }
View Full Code Here

               if (acceptorUsed.getClusterConnection() != null)
               {
                  acceptorUsed.getClusterConnection().addClusterTopologyListener(listener);
                 
                  rc.addCloseListener(new CloseListener()
                  {
                     public void connectionClosed()
                     {
                        acceptorUsed.getClusterConnection().removeClusterTopologyListener(listener);
                     }
View Full Code Here

            if (acceptorUsed.getClusterConnection() != null)
            {
               acceptorUsed.getClusterConnection().addClusterTopologyListener(listener);

               rc.addCloseListener(new CloseListener()
               {
                  public void connectionClosed()
                  {
                     acceptorUsed.getClusterConnection().removeClusterTopologyListener(listener);
                  }
View Full Code Here

TOP

Related Classes of org.hornetq.core.remoting.CloseListener

Copyright © 2018 www.massapicom. 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.