Examples of addCloseListener()


Examples of org.glassfish.grizzly.Connection.addCloseListener()

                });

                TYRUS_CONNECTION.set(grizzlyConnection, connection);
                TASK_PROCESSOR.set(grizzlyConnection, new TaskProcessor());

                grizzlyConnection.addCloseListener(new CloseListener() {
                    @Override
                    public void onClosed(Closeable closeable, ICloseType type) throws IOException {
                        // close detected on connection
                        connection.close(CloseReasons.GOING_AWAY.getCloseReason());
                        // might not be necessary, connection is going to be recycled/freed anyway
View Full Code Here

Examples of org.hornetq.core.protocol.core.CoreRemotingConnection.addCloseListener()

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

Examples of org.hornetq.core.protocol.core.CoreRemotingConnection.addCloseListener()

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

Examples of org.hornetq.core.protocol.core.CoreRemotingConnection.addCloseListener()

            // It's async so need to wait a while
            Thread.sleep(10);
         }
      }

      serverConn.addCloseListener(serverListener);
      Assert.assertTrue("server has not received any ping from the client",
                        pingOnServerLatch.await(4000, TimeUnit.MILLISECONDS));

      // we let the server receives at least 1 ping (so that it uses the client ConnectionTTL value)
View Full Code Here

Examples of org.hornetq.core.protocol.core.CoreRemotingConnection.addCloseListener()

            // It's async so need to wait a while
            Thread.sleep(10);
         }
      }

      serverConn.addCloseListener(serverListener);
      Assert.assertTrue("server has not received any ping from the client",
                        pingOnServerLatch.await(4000, TimeUnit.MILLISECONDS));

      // we let the server receives at least 1 ping (so that it uses the client ConnectionTTL value)
View Full Code Here

Examples of org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.addCloseListener()

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

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

Examples of org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.addCloseListener()

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

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

Examples of org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.addCloseListener()

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

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

Examples of org.hornetq.spi.core.protocol.RemotingConnection.addCloseListener()

      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

Examples of org.hornetq.spi.core.protocol.RemotingConnection.addCloseListener()

      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
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.