Project Wonder 5.0

er.extensions.appserver
Class ERXKeepAliveResponse

java.lang.Object
  extended by com.webobjects.appserver.WOMessage
      extended by com.webobjects.appserver.WOResponse
          extended by er.extensions.appserver.ERXResponse
              extended by er.extensions.appserver.ERXKeepAliveResponse
All Implemented Interfaces:
com.webobjects.appserver.WOActionResults, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, java.lang.Cloneable

public class ERXKeepAliveResponse
extends ERXResponse

Special response that keeps the connection alive and pushes the data to the client. It does this by opening a stream that has small buffer but huge length.

Author:
ak

Nested Class Summary
 
Nested classes/interfaces inherited from class er.extensions.appserver.ERXResponse
ERXResponse.Context
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Field Summary
protected  byte[] _current
          Current data to write to client.
protected  int _currentIndex
          Current index in
protected  java.util.Queue<byte[]> _queue
          Queue to push the items into.
protected static org.apache.log4j.Logger log
           
 
Fields inherited from class er.extensions.appserver.ERXResponse
ContentDispositionHeaderKey, ContentTypeHeaderKey, DisablePageCachingKey
 
Fields inherited from class com.webobjects.appserver.WOResponse
_contentInputStream, _contentInputStreamBufferSize, _contentInputStreamLength
 
Fields inherited from class com.webobjects.appserver.WOMessage
_content, _contentData, _contentEncoding, _cookies, _headers, _httpVersion, _TheCookieKey, _TheSetCookieKey, _userInfo, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_FOUND, HTTP_STATUS_INTERNAL_ERROR, HTTP_STATUS_MOVED_PERMANENTLY, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK, TheDefaultResponseEncoding
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
ERXKeepAliveResponse()
           
 
Method Summary
 void push(byte[] data)
          Enqueues the data.
 void push(java.lang.String str)
          Enqueues the data for this string using the response encoding.
 void reset()
          Resets the response by clearing out the current item and notifying the queue.
 
Methods inherited from class er.extensions.appserver.ERXResponse
__setContent, _appendTagAttributeAndValue, _finalizeInContext, contentDisposition, contentType, disableClientCaching, isAttachment, isHTML, isIE, isPageCachingDisabled, isXHTML, mark, popContent, popPartial, pushContent, pushPartial, setUserInfoForKey, setXHTML, userInfoForKey
 
Methods inherited from class com.webobjects.appserver.WOResponse
_isClientCachingDisabled, _redirectionResponseForAbsoluteURL, _redirectResponse, clone, contentInputStream, contentInputStreamBufferSize, contentInputStreamLength, generateResponse, setContentStream, setStatus, status, toString
 
Methods inherited from class com.webobjects.appserver.WOMessage
_appendContentAsciiString, _contentLength, _finalizeCookies, _initCookies, _setHeader, _setHeaders, _stringByEscapingString, addCookie, appendContentCharacter, appendContentData, appendContentDOMDocumentFragment, appendContentHTMLAttributeValue, appendContentHTMLString, appendContentString, appendHeader, appendHeaders, canAccessFieldsDirectly, content, contentAsDOMDocument, contentEncoding, contentString, cookies, defaultEncoding, defaultURLEncoding, equals, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, headerForKey, headerKeys, headers, headersForKey, httpVersion, removeCookie, removeHeadersForKey, requiresHTMLEscaping, setContent, setContent, setContent, setContentDOMDocument, setContentEncoding, setDefaultEncoding, setDefaultURLEncoding, setHeader, setHeaders, setHeaders, setHTTPVersion, setUserInfo, stringByEscapingHTMLAttributeValue, stringByEscapingHTMLString, takeValueForKey, takeValueForKeyPath, unableToSetNullForKey, userInfo, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

_queue

protected java.util.Queue<byte[]> _queue
Queue to push the items into.


_current

protected byte[] _current
Current data to write to client.


_currentIndex

protected int _currentIndex
Current index in

Constructor Detail

ERXKeepAliveResponse

public ERXKeepAliveResponse()
Method Detail

push

public void push(java.lang.String str)
Enqueues the data for this string using the response encoding.

Parameters:
str - the string to push

push

public void push(byte[] data)
Enqueues the data.

Parameters:
data -

reset

public void reset()
Resets the response by clearing out the current item and notifying the queue.


Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.