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


   }

   public void testProducerWithSmallWindowSizeAndLargeMessage() throws Exception
   {
      final CountDownLatch latch = new CountDownLatch(1);
      server.getRemotingService().addInterceptor(new Interceptor()
      {
         public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
         {
            if (packet.getType() == PacketImpl.SESS_SEND)
            {
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

   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

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

            try
            {
               liveServer.addInterceptor(interceptor);
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

    */
   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

      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

         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

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.