Package org.hornetq.core.protocol.core.impl.wireformat

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


      return packet.getPacketSize();
   }
    
   public int sendMessage(ServerMessage message, long consumerID, int deliveryCount)
   {
      Packet packet = new SessionReceiveMessage(consumerID, message, deliveryCount);

      channel.sendBatched(packet);
     
      int size =  packet.getPacketSize();

      return size;
   }
View Full Code Here


            packet = new SessionSendLargeMessage();
            break;
         }
         case SESS_RECEIVE_MSG:
         {
            packet = new SessionReceiveMessage();
            break;
         }
         case SESS_RECEIVE_LARGE_MSG:
         {
            packet = new SessionReceiveLargeMessage();
View Full Code Here

               break;
            }
            case SESS_RECEIVE_MSG:
            {
               SessionReceiveMessage message = (SessionReceiveMessage)packet;

               clientSession.handleReceiveMessage(message.getConsumerID(), message);

               break;
            }
            case SESS_RECEIVE_LARGE_MSG:
            {
               SessionReceiveLargeMessage message = (SessionReceiveLargeMessage)packet;

               clientSession.handleReceiveLargeMessage(message.getConsumerID(), message);

               break;
            }
            case PacketImpl.SESS_PRODUCER_CREDITS:
            {
               SessionProducerCreditsMessage message = (SessionProducerCreditsMessage)packet;

               clientSession.handleReceiveProducerCredits(message.getAddress(), message.getCredits());

               break;
            }
            case PacketImpl.SESS_PRODUCER_FAIL_CREDITS:
            {
               SessionProducerCreditsFailMessage message = (SessionProducerCreditsFailMessage)packet;

               clientSession.handleReceiveProducerFailCredits(message.getAddress(), message.getCredits());

               break;
            }
            case EXCEPTION:
            {
View Full Code Here

      return packet.getPacketSize();
   }

   public int sendMessage(ServerMessage message, long consumerID, int deliveryCount)
   {
      Packet packet = new SessionReceiveMessage(consumerID, message, deliveryCount);

      int size = 0;

      if (channel.sendBatched(packet))
      {
         size = packet.getPacketSize();
      }

      return size;
   }
View Full Code Here

      switch (packetType)
      {
         case SESS_RECEIVE_MSG:
         {
            packet = new SessionReceiveMessage(new ClientMessageImpl());
            break;
         }
         case SESS_RECEIVE_LARGE_MSG:
         {
            packet = new SessionReceiveClientLargeMessage(new ClientLargeMessageImpl());
View Full Code Here

   {
      public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
      {
         if (packet.getType() == PacketImpl.SESS_RECEIVE_MSG)
         {
            SessionReceiveMessage p = (SessionReceiveMessage)packet;

            ClientMessage cm = (ClientMessage)p.getMessage();

            cm.putStringProperty(InterceptorTest.key, "orange");
         }

         return true;
View Full Code Here

      public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
      {
         if (packet.getType() == PacketImpl.SESS_RECEIVE_MSG)
         {
            SessionReceiveMessage p = (SessionReceiveMessage)packet;

            Message sm = p.getMessage();

            sm.putIntProperty(key, num);

            wasCalled = true;
View Full Code Here

      }
      if (changeMessage)
      {
         if (packet instanceof SessionReceiveMessage)
         {
            SessionReceiveMessage deliver = (SessionReceiveMessage)packet;
            log.debug("msg = " + deliver.getMessage().getClass().getName());
            deliver.getMessage().putStringProperty(new SimpleString("DummyInterceptor"), new SimpleString("was here"));
         }
      }
      return true;
   }
View Full Code Here

   {
      public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
      {
         if (packet.getType() == PacketImpl.SESS_RECEIVE_MSG)
         {
            SessionReceiveMessage p = (SessionReceiveMessage)packet;

            ClientMessage cm = (ClientMessage)p.getMessage();

            cm.putStringProperty(InterceptorTest.key, "orange");
         }

         return true;
View Full Code Here

      public boolean intercept(final Packet packet, final RemotingConnection connection) throws HornetQException
      {
         if (packet.getType() == PacketImpl.SESS_RECEIVE_MSG)
         {
            SessionReceiveMessage p = (SessionReceiveMessage)packet;

            Message sm = p.getMessage();

            sm.putIntProperty(key, num);

            wasCalled = true;
View Full Code Here

TOP

Related Classes of org.hornetq.core.protocol.core.impl.wireformat.SessionReceiveMessage

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.