Package org.hornetq.core.protocol.stomp

Examples of org.hornetq.core.protocol.stomp.StompFrame.addHeader()


            response.addHeader(Stomp.Headers.Connected.SERVER,
                               connection.getHornetQServerName());

            if (requestID != null)
            {
               response.addHeader(Stomp.Headers.Connected.RESPONSE_ID,
                                  requestID);
            }

            // heart-beat. We need to start after connected frame has been sent.
            // otherwise the client may receive heart-beat before it receives
View Full Code Here


            if (heartBeat != null)
            {
               handleHeartBeat(heartBeat);
               if (heartBeater == null)
               {
                  response.addHeader(Stomp.Headers.Connected.HEART_BEAT, "0,0");
               }
               else
               {
                  response.addHeader(Stomp.Headers.Connected.HEART_BEAT, heartBeater.getServerHeartBeatValue());
               }
View Full Code Here

               {
                  response.addHeader(Stomp.Headers.Connected.HEART_BEAT, "0,0");
               }
               else
               {
                  response.addHeader(Stomp.Headers.Connected.HEART_BEAT, heartBeater.getServerHeartBeatValue());
               }
            }
         }
         else
         {
View Full Code Here

         }
         else
         {
            // not valid
            response = new StompFrame(Stomp.Responses.ERROR, true);
            response.addHeader(Stomp.Headers.Error.MESSAGE, "Failed to connect");
            response.setBody("The login account is not valid.");
         }
      }
      catch (HornetQStompException e)
      {
View Full Code Here

   {
      StompFrame frame = super.createMessageFrame(serverMessage, subscription, deliveryCount);

      if (!subscription.getAck().equals(Stomp.Headers.Subscribe.AckModeValues.AUTO))
      {
         frame.addHeader(Stomp.Headers.Message.ACK, String.valueOf(serverMessage.getMessageID()));
      }

      return frame;
   }
View Full Code Here

            connection.setValid(true);

            response = this.createStompFrame(Stomp.Responses.CONNECTED);

            // version
            response.addHeader(Stomp.Headers.Connected.VERSION,
                               connection.getVersion());

            // session
            response.addHeader(Stomp.Headers.Connected.SESSION, connection
               .getID().toString());
View Full Code Here

            // version
            response.addHeader(Stomp.Headers.Connected.VERSION,
                               connection.getVersion());

            // session
            response.addHeader(Stomp.Headers.Connected.SESSION, connection
               .getID().toString());

            // server
            response.addHeader(Stomp.Headers.Connected.SERVER,
                               connection.getHornetQServerName());
View Full Code Here

            // session
            response.addHeader(Stomp.Headers.Connected.SESSION, connection
               .getID().toString());

            // server
            response.addHeader(Stomp.Headers.Connected.SERVER,
                               connection.getHornetQServerName());

            if (requestID != null)
            {
               response.addHeader(Stomp.Headers.Connected.RESPONSE_ID,
View Full Code Here

            response.addHeader(Stomp.Headers.Connected.SERVER,
                               connection.getHornetQServerName());

            if (requestID != null)
            {
               response.addHeader(Stomp.Headers.Connected.RESPONSE_ID,
                                  requestID);
            }

            // heart-beat. We need to start after connected frame has been sent.
            // otherwise the client may receive heart-beat before it receives
View Full Code Here

            if (heartBeat != null)
            {
               handleHeartBeat(heartBeat);
               if (heartBeater == null)
               {
                  response.addHeader(Stomp.Headers.Connected.HEART_BEAT, "0,0");
               }
               else
               {
                  response.addHeader(Stomp.Headers.Connected.HEART_BEAT, heartBeater.getServerHeartBeatValue());
               }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.