Package org.hornetq.api.core

Examples of org.hornetq.api.core.Interceptor


      SimpleString address = RandomUtil.randomSimpleString();

      // server must received at least one ping from the client to pass
      // so that the server connection TTL is configured with the client value
      final CountDownLatch pingOnServerLatch = new CountDownLatch(1);
      server.getRemotingService().addInterceptor(new Interceptor()
      {

         public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
         {
            if (packet.getType() == PacketImpl.PING)
View Full Code Here


    */
   private void internalTest() throws Exception
   {
      final TransportConfiguration transportConfig = new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyConnectorFactory");

      Interceptor noPongInterceptor = new Interceptor()
      {
         public boolean intercept(final Packet packet, final RemotingConnection conn) throws HornetQException
         {
            PingStressTest.log.info("In interceptor, packet is " + packet.getType());
            if (packet.getType() == PacketImpl.PING)
View Full Code Here

      locator.setBlockOnDurableSend(true);
      locator.setReconnectAttempts(-1);
      locator.setProducerWindowSize(1000);
      locator.setRetryInterval(123);
      final ArrayList<ClientSession> sessionList = new ArrayList<ClientSession>();
      Interceptor interceptorClient = new Interceptor()
      {
         AtomicInteger count = new AtomicInteger(0);
         public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException
         {
            log.debug("Intercept..." + packet.getClass().getName());
View Full Code Here

      SimpleString address = RandomUtil.randomSimpleString();

      // server must received at least one ping from the client to pass
      // so that the server connection TTL is configured with the client value
      final CountDownLatch pingOnServerLatch = new CountDownLatch(1);
      server.getRemotingService().addInterceptor(new Interceptor()
      {

         public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
         {
            if (packet.getType() == PacketImpl.PING)
View Full Code Here

         producer.send(message);
      }
      session.close();
      sf.close();
      final CountDownLatch latch = new CountDownLatch(numMessages);
      server.getRemotingService().addInterceptor(new Interceptor()
      {
         public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
         {
            if (packet.getType() == PacketImpl.SESS_ACKNOWLEDGE)
            {
View Full Code Here

      class Committer extends Thread
      {
         @Override
         public void run()
         {
            Interceptor interceptor = new DelayInterceptor3();

            try
            {
               liveServer.addInterceptor(interceptor);
View Full Code Here

      class Committer extends Thread
      {
         @Override
         public void run()
         {
            Interceptor interceptor = new DelayInterceptor3();

            try
            {
               liveServer.addInterceptor(interceptor);
View Full Code Here

      locator.setConfirmationWindowSize(1024 * 1024);
      locator.setProducerWindowSize(1000);

      final AtomicInteger count = new AtomicInteger(0);

      Interceptor intercept = new Interceptor()
      {

         public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException
         {
            System.out.println("Intercept..." + packet.getClass().getName());
View Full Code Here

   public void testClientFailureNoServerPing() throws Exception
   {
      // server must received at least one ping from the client to pass
      // so that the server connection TTL is configured with the client value
      final CountDownLatch pingOnServerLatch = new CountDownLatch(2);
      server.getRemotingService().addInterceptor(new Interceptor()
      {

         public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
         {
            if (packet.getType() == PacketImpl.PING)
View Full Code Here

      SimpleString address = RandomUtil.randomSimpleString();

      // server must received at least one ping from the client to pass
      // so that the server connection TTL is configured with the client value
      final CountDownLatch pingOnServerLatch = new CountDownLatch(1);
      server.getRemotingService().addInterceptor(new Interceptor()
      {

         public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
         {
            if (packet.getType() == PacketImpl.PING)
View Full Code Here

TOP

Related Classes of org.hornetq.api.core.Interceptor

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.