Examples of heartBeat()


Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

          public void activate(final MessageQueue queue) {
            try {
              queue.poll(writer);
              queue.setActivationCallback(null);

              queue.heartBeat();
              writer.flush();
            }
            catch (IOException e) {
              log.debug("Closing queue with id: " + queue.getSession().getSessionId() + " due to IOException", e);
             
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

        sendDisconnectDueToSessionExpiry(httpServletResponse);
        return;
      }

      queue.heartBeat();

      if (sse) {
        final long timeout = System.currentTimeMillis() + getSSETimeout();
        while (System.currentTimeMillis() < timeout) {
          prepareSSEContinue(httpServletResponse);
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

        while (System.currentTimeMillis() < timeout) {
          prepareSSEContinue(httpServletResponse);
          outputStream.flush();
          queue.poll(TimeUnit.MILLISECONDS, getSSETimeout(), new OutputStreamWriteAdapter(outputStream));
          outputStream.write(SSE_TERMINATION_BYTES);
          queue.heartBeat();
        }
      }
      else if (wait) {
        queue.poll(TimeUnit.MILLISECONDS, getLongPollTimeout(), new OutputStreamWriteAdapter(outputStream));
      }
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

      }
      sendDisconnectDueToSessionExpiry(response);
      return;
    }

    queue.heartBeat();

    final OutputStreamWriteAdapter writer = new OutputStreamWriteAdapter(response.getOutputStream());

    if (isSSERequest(request)) {
      prepareSSE(response);
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

              queue.setActivationCallback(null);
              queue.poll(writer);

              writer.write(SSE_TERMINATION_BYTES);

              queue.heartBeat();
              writer.flush();

              prepareSSEContinue(response);
            }
            catch (final Throwable t) {
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

          public void activate(final MessageQueue queue) {
            try {
              queue.poll(writer);
              queue.setActivationCallback(null);

              queue.heartBeat();
              writer.flush();
            }
            catch (final Throwable t) {
              try {
                writeExceptionToOutputStream((HttpServletResponse) asyncContext.getResponse(), t);
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

        sendDisconnectDueToSessionExpiry(httpServletResponse);
        return;
      }

      queue.heartBeat();

      if (sse) {
        while (!queue.isStale()) {
          prepareSSEContinue(httpServletResponse);
          queue.poll(TimeUnit.MILLISECONDS, getSSETimeout(), new OutputStreamWriteAdapter(outputStream));
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

        while (!queue.isStale()) {
          prepareSSEContinue(httpServletResponse);
          queue.poll(TimeUnit.MILLISECONDS, getSSETimeout(), new OutputStreamWriteAdapter(outputStream));
          outputStream.write(SSE_TERMINATION_BYTES);
          outputStream.flush();
          queue.heartBeat();
        }
      }
      else if (wait) {
        queue.poll(TimeUnit.MILLISECONDS, getLongPollTimeout(), new OutputStreamWriteAdapter(outputStream));
        outputStream.close();
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

      }
      sendDisconnectDueToSessionExpiry(response);
      return;
    }

    queue.heartBeat();

    final OutputStreamWriteAdapter writer;
    final AsyncContext asyncContext = request.startAsync();
    asyncContext.setTimeout(60000);
    queue.setTimeout(65000);
View Full Code Here

Examples of org.jboss.errai.bus.server.api.MessageQueue.heartBeat()

        public void activate(final MessageQueue queue) {
          try {
            queue.poll(writer);
            queue.setActivationCallback(null);

            queue.heartBeat();
            writer.flush();
          }
          catch (IOException e) {
            log.debug("Closing queue with id: " + queue.getSession().getSessionId() + " due to IOException", e);
           
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.