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

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


                  session.sendLarge(message.getLargeMessage());
                  break;
               }
               case SESS_SEND_CONTINUATION:
               {
                  SessionSendContinuationMessage message = (SessionSendContinuationMessage)packet;
                  requiresResponse = message.isRequiresResponse();
                  session.sendContinuations(message.getPacketSize(), message.getBody(), message.isContinues());
                  if (requiresResponse)
                  {
                     response = new NullResponseMessage();
                  }
                  break;
               }
               case SESS_FORCE_CONSUMER_DELIVERY:
               {
                  SessionForceConsumerDelivery message = (SessionForceConsumerDelivery)packet;
                  session.forceConsumerDelivery(message.getConsumerID(), message.getSequence());
                  break;
               }
               case PacketImpl.SESS_PRODUCER_REQUEST_CREDITS:
               {
                  SessionRequestProducerCreditsMessage message = (SessionRequestProducerCreditsMessage)packet;
                  session.requestProducerCredits(message.getAddress(), message.getCredits());
                  break;
               }
               case PacketImpl.SESS_ADD_METADATA:
               {
                  response = new NullResponseMessage();
                  SessionAddMetaDataMessage message = (SessionAddMetaDataMessage)packet;
                  session.addMetaData(message.getKey(), message.getData());
                  break;
               }
            }
         }
         catch (HornetQXAException e)
View Full Code Here


                  session.sendLarge(message.getLargeMessageHeader());
                  break;
               }
               case SESS_SEND_CONTINUATION:
               {
                  SessionSendContinuationMessage message = (SessionSendContinuationMessage)packet;
                  requiresResponse = message.isRequiresResponse();
                  session.sendContinuations(message.getPacketSize(), message.getBody(), message.isContinues());
                  if (requiresResponse)
                  {
                     response = new NullResponseMessage();
                  }
                  break;
               }
               case SESS_FORCE_CONSUMER_DELIVERY:
               {
                  SessionForceConsumerDelivery message = (SessionForceConsumerDelivery)packet;
                  session.forceConsumerDelivery(message.getConsumerID(), message.getSequence());
                  break;
               }
               case PacketImpl.SESS_PRODUCER_REQUEST_CREDITS:
               {
                  SessionRequestProducerCreditsMessage message = (SessionRequestProducerCreditsMessage)packet;
                  session.requestProducerCredits(message.getAddress(), message.getCredits());
                  break;
               }
               case PacketImpl.SESS_ADD_METADATA:
               {
                  response = new NullResponseMessage();
                  SessionAddMetaDataMessage message = (SessionAddMetaDataMessage)packet;
                  session.addMetaData(message.getKey(), message.getData());
                  break;
               }
            }
         }
         catch (HornetQXAException e)
View Full Code Here

            pos += chunkLength;

            lastChunk = pos >= bodySize;

            final SessionSendContinuationMessage chunk = new SessionSendContinuationMessage(bodyBuffer.toByteBuffer()
                                                                                                      .array(),
                                                                                            !lastChunk,
                                                                                            lastChunk && sendBlocking);

            if (sendBlocking && lastChunk)
            {
               // When sending it blocking, only the last chunk will be blocking.
               channel.sendBlocking(chunk);
            }
            else
            {
               channel.send(chunk);
            }

            try
            {
               credits.acquireCredits(chunk.getPacketSize());
            }
            catch (InterruptedException e)
            {
            }
         }
View Full Code Here

            System.arraycopy(buff, 0, buff2, 0, pos);

            buff = buff2;
         }

         final SessionSendContinuationMessage chunk = new SessionSendContinuationMessage(buff,
                                                                                         !lastPacket,
                                                                                         lastPacket && sendBlocking);

         if (sendBlocking && lastPacket)
         {
            // When sending it blocking, only the last chunk will be blocking.
            channel.sendBlocking(chunk);
         }
         else
         {
            channel.send(chunk);
         }

         try
         {
            credits.acquireCredits(chunk.getPacketSize());
         }
         catch (InterruptedException e)
         {
         }
      }
View Full Code Here

            packet = new SessionReceiveContinuationMessage();
            break;
         }
         case SESS_SEND_CONTINUATION:
         {
            packet = new SessionSendContinuationMessage();
            break;
         }
         case SESS_PRODUCER_REQUEST_CREDITS:
         {
            packet = new SessionRequestProducerCreditsMessage();
View Full Code Here

            packet = new SessionReceiveContinuationMessage();
            break;
         }
         case SESS_SEND_CONTINUATION:
         {
            packet = new SessionSendContinuationMessage();
            break;
         }
         case SESS_PRODUCER_REQUEST_CREDITS:
         {
            packet = new SessionRequestProducerCreditsMessage();
View Full Code Here

         SessionSendMessage ssm = (SessionSendMessage)packet;
         callSendAck(ssm.getHandler(), ssm.getMessage());
      }
      else if (packet.getType() == PacketImpl.SESS_SEND_CONTINUATION)
      {
         SessionSendContinuationMessage scm = (SessionSendContinuationMessage) packet;
         if (!scm.isContinues())
         {
            callSendAck(scm.getHandler(), scm.getMessage());
         }
      }
   }
View Full Code Here

            pos += chunkLength;

            lastChunk = pos >= bodySize;

            final SessionSendContinuationMessage chunk = new SessionSendContinuationMessage(bodyBuffer.toByteBuffer()
                                                                                                      .array(),
                                                                                            !lastChunk,
                                                                                            lastChunk && sendBlocking);

            if (sendBlocking && lastChunk)
            {
               // When sending it blocking, only the last chunk will be blocking.
               channel.sendBlocking(chunk);
            }
            else
            {
               channel.send(chunk);
            }

            try
            {
               credits.acquireCredits(chunk.getPacketSize());
            }
            catch (InterruptedException e)
            {
            }
         }
View Full Code Here

            System.arraycopy(buff, 0, buff2, 0, pos);

            buff = buff2;
         }

         final SessionSendContinuationMessage chunk = new SessionSendContinuationMessage(buff,
                                                                                         !lastPacket,
                                                                                         lastPacket && sendBlocking);

         if (sendBlocking && lastPacket)
         {
            // When sending it blocking, only the last chunk will be blocking.
            channel.sendBlocking(chunk);
         }
         else
         {
            channel.send(chunk);
         }

         try
         {
            credits.acquireCredits(chunk.getPacketSize());
         }
         catch (InterruptedException e)
         {
         }
      }
View Full Code Here

         SessionSendMessage ssm = (SessionSendMessage) packet;
         callSendAck(ssm.getHandler(), ssm.getMessage());
      }
      else if (packet.getType() == PacketImpl.SESS_SEND_CONTINUATION)
      {
         SessionSendContinuationMessage scm = (SessionSendContinuationMessage) packet;
         if (!scm.isContinues())
         {
            callSendAck(scm.getHandler(), scm.getMessage());
         }
      }
   }
View Full Code Here

TOP

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

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.