@Override protected void writeFrameInternal(SockJsFrame frame) throws IOException { if (isActive()) { SockJsFrameFormat frameFormat = this.frameFormat; ServerHttpResponse response = this.response; if (frameFormat != null && response != null) { String formattedFrame = frameFormat.format(frame); if (logger.isTraceEnabled()) { logger.trace("Writing to HTTP response: " + formattedFrame); } response.getBody().write(formattedFrame.getBytes(SockJsFrame.CHARSET)); response.flush(); } } }
@Override protected final void sendMessageInternal(String message) throws SockJsTransportFailureException { synchronized (this.responseLock) { this.messageCache.add(message); if (logger.isTraceEnabled()) { logger.trace(this.messageCache.size() + " message(s) to flush in session " + getId()); } if (isActive() && this.readyToSend) { if (logger.isTraceEnabled()) { logger.trace("Session is active, ready to flush."); } cancelHeartbeat(); flushCache(); } else { if (logger.isTraceEnabled()) { logger.trace("Session is not active, not ready to flush."); } } } }
else if (!sockJsSession.isActive()) { if (logger.isTraceEnabled()) { logger.trace("Starting " + getTransportType() + " async request.");
disableShallowEtagHeaderFilter(request); handleRequestInternal(request, response, false); this.readyToSend = isActive();
handleRequestInternal(request, response, true); this.readyToSend = isActive();
@Override protected void writeFrameInternal(SockJsFrame frame) throws IOException { if (isActive()) { SockJsFrameFormat frameFormat = this.frameFormat; ServerHttpResponse response = this.response; if (frameFormat != null && response != null) { String formattedFrame = frameFormat.format(frame); if (logger.isTraceEnabled()) { logger.trace("Writing to HTTP response: " + formattedFrame); } response.getBody().write(formattedFrame.getBytes(SockJsFrame.CHARSET)); response.flush(); } } }
@Override protected void writeFrameInternal(SockJsFrame frame) throws IOException { if (isActive()) { SockJsFrameFormat frameFormat = this.frameFormat; ServerHttpResponse response = this.response; if (frameFormat != null && response != null) { String formattedFrame = frameFormat.format(frame); if (logger.isTraceEnabled()) { logger.trace("Writing to HTTP response: " + formattedFrame); } response.getBody().write(formattedFrame.getBytes(SockJsFrame.CHARSET)); response.flush(); } } }
@Override protected final void sendMessageInternal(String message) throws SockJsTransportFailureException { synchronized (this.responseLock) { this.messageCache.add(message); if (logger.isTraceEnabled()) { logger.trace(this.messageCache.size() + " message(s) to flush in session " + getId()); } if (isActive() && this.readyToSend) { if (logger.isTraceEnabled()) { logger.trace("Session is active, ready to flush."); } cancelHeartbeat(); flushCache(); } else { if (logger.isTraceEnabled()) { logger.trace("Session is not active, not ready to flush."); } } } }
@Override protected final void sendMessageInternal(String message) throws SockJsTransportFailureException { synchronized (this.responseLock) { this.messageCache.add(message); if (logger.isTraceEnabled()) { logger.trace(this.messageCache.size() + " message(s) to flush in session " + getId()); } if (isActive() && this.readyToSend) { if (logger.isTraceEnabled()) { logger.trace("Session is active, ready to flush."); } cancelHeartbeat(); flushCache(); } else { if (logger.isTraceEnabled()) { logger.trace("Session is not active, not ready to flush."); } } } }
else if (!sockJsSession.isActive()) { if (logger.isTraceEnabled()) { logger.trace("Starting " + getTransportType() + " async request.");
else if (!sockJsSession.isActive()) { if (logger.isTraceEnabled()) { logger.trace("Starting " + getTransportType() + " async request.");
disableShallowEtagHeaderFilter(request); handleRequestInternal(request, response, false); this.readyToSend = isActive();
disableShallowEtagHeaderFilter(request); handleRequestInternal(request, response, false); this.readyToSend = isActive();
handleRequestInternal(request, response, true); this.readyToSend = isActive();
handleRequestInternal(request, response, true); this.readyToSend = isActive();