Package org.hornetq.core.protocol.stomp

Examples of org.hornetq.core.protocol.stomp.HornetQStompException


   private void handleHeartBeat(String heartBeatHeader) throws HornetQStompException
   {
      String[] params = heartBeatHeader.split(",");
      if (params.length != 2)
      {
         throw new HornetQStompException("Incorrect heartbeat header " + heartBeatHeader);
      }

      //client ping
      long minPingInterval = Long.valueOf(params[0]);
      //client receive ping
View Full Code Here


      {
         subscriptionID = id;
      }
      else
      {
         response = new HornetQStompException("Must specify the subscription's id").getFrame();
         return response;
      }

      try
      {
View Full Code Here

         HornetQServerLogger.LOGGER.stompTXAckNorSupported();
      }

      if (subscriptionID == null)
      {
         response = new HornetQStompException("subscription header is required").getFrame();
         return response;
      }

      try
      {
View Full Code Here

               }
               nextChar = false;
            }
            else if (workingBuffer[offset] == CR)
            {
               if (nextChar) throw new HornetQStompException("Invalid char sequence: two consecutive CRs.");
               nextChar = true;
            }
            else
            {
               break;
            }
            offset++;
            if (offset == data) return false; //no more bytes
         }

         if (nextChar)
         {
            throw new HornetQStompException("Invalid char sequence: There is a CR not followed by an LF");
         }

         //if some EOLs have been processed, drop those bytes before parsing command
         if (offset > 0)
         {
View Full Code Here

                        {
                           headerName = holder.getString();
                        }
                        catch (UnsupportedEncodingException e)
                        {
                           throw new HornetQStompException("Encoding exception", e);
                        }

                        holder.reset();

                        inHeaderName = false;

                        headerValueWhitespace = true;
                     }
                  }

                  whiteSpaceOnly = false;

                  break;
               }
               case StompDecoder.LN:
               {
                  if (isEscaping)
                  {
                     holder.append(StompDecoder.NEW_LINE);
                     isEscaping = false;
                  }
                  else
                  {
                     holder.append(b);
                  }
                  break;
               }
               case StompDecoder.NEW_LINE:
               {
                  if (whiteSpaceOnly)
                  {
                     // Headers are terminated by a blank line
                     readingHeaders = false;

                     break outer;
                  }

                  String headerValue;
                  try
                  {
                     headerValue = holder.getString();
                  }
                  catch (UnsupportedEncodingException e)
                  {
                     throw new HornetQStompException("Encoding exception.", e);
                  }
                  holder.reset();

                  headers.put(headerName, headerValue);
View Full Code Here

         response = e.getFrame();
      }
      catch (UnsupportedEncodingException e)
      {
         HornetQServerLogger.LOGGER.errorEncodingStompPacket(e);
         response = new HornetQStompException("Encoding error.", e).getFrame();
      }

      return response;
   }
View Full Code Here

   private void handleHeartBeat(String heartBeatHeader) throws HornetQStompException
   {
      String[] params = heartBeatHeader.split(",");
      if (params.length != 2)
      {
         throw new HornetQStompException("Incorrect heartbeat header " + heartBeatHeader);
      }

      //client ping
      long minPingInterval = Long.valueOf(params[0]);
      //client receive ping
View Full Code Here

      {
         subscriptionID = id;
      }
      else
      {
          response = new HornetQStompException("Must specify the subscription's id").getFrame();
          return response;
      }

      try
      {
View Full Code Here

         HornetQServerLogger.LOGGER.stompTXAckNorSupported();
      }

      if (subscriptionID == null)
      {
         response = new HornetQStompException("subscription header is required").getFrame();
         return response;
      }

      try
      {
View Full Code Here

               }
               nextChar = false;
            }
            else if (workingBuffer[offset] == CR)
            {
               if (nextChar) throw new HornetQStompException("Invalid char sequence: two consecutive CRs.");
               nextChar = true;
            }
            else
            {
               break;
            }
            offset++;
            if (offset == data) return false; //no more bytes
         }
        
         if (nextChar)
         {
            throw new HornetQStompException("Invalid char sequence: There is a CR not followed by an LF");
         }
        
         //if some EOLs have been processed, drop those bytes before parsing command
         if (offset > 0)
         {
View Full Code Here

TOP

Related Classes of org.hornetq.core.protocol.stomp.HornetQStompException

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.