org.jdesktop.http.async
Class HtmlHttpRequest

java.lang.Object
  extended by org.jdesktop.beans.AbstractBean
      extended by org.jdesktop.http.async.AsyncHttpRequest
          extended by org.jdesktop.http.async.HtmlHttpRequest

public final class HtmlHttpRequest
extends AsyncHttpRequest

NOTE: This class requires JTidy!


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.http.async.AsyncHttpRequest
AsyncHttpRequest.AsyncWorker, AsyncHttpRequest.ReadyState
 
Constructor Summary
HtmlHttpRequest()
          Creates a new instance of XmlHttpRequest
 
Method Summary
 SimpleDocument getResponseHtml()
          If the readyState attribute has a value other than LOADED, then this method will return null.
protected  void handleResponse(String responseText)
          Method that provides a hook for subclasses to create concrete types (such as DOM, JSONObject, etc) when the response has been fully read.
protected  void reset()
          Clears any response state and resets the readyState to UNINITIALIZED.
 
Methods inherited from class org.jdesktop.http.async.AsyncHttpRequest
abort, addReadyStateChangeListener, createAsyncWorker, getAllResponseHeaders, getException, getFollowRedirects, getOnReadyStateChange, getParameter, getParameters, getReadyState, getReadyStateChangeListeners, getResponseHeader, getResponseText, getSession, getStatus, getStatusText, open, open, removeReadyStateChangeListener, send, send, send, setFollowsRedirects, setOnReadyStateChange, setParameter, setParameter, setParameters, setRequestHeader, setSession
 
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlHttpRequest

public HtmlHttpRequest()
Creates a new instance of XmlHttpRequest

Method Detail

getResponseHtml

public final SimpleDocument getResponseHtml()
If the readyState attribute has a value other than LOADED, then this method will return null. Otherwise, if the Content-Type contains text/html, application/html, or ends in +html then a Document will be returned. Otherwise, null is returned.


reset

protected void reset()
Description copied from class: AsyncHttpRequest
Clears any response state and resets the readyState to UNINITIALIZED. Any overriding implementations MUST call super.reset() at the end of the implementation.

Overrides:
reset in class AsyncHttpRequest

handleResponse

protected void handleResponse(String responseText)
                       throws Exception
Description copied from class: AsyncHttpRequest
Method that provides a hook for subclasses to create concrete types (such as DOM, JSONObject, etc) when the response has been fully read. There is no need to call super.handleResponse(txt).

Overrides:
handleResponse in class AsyncHttpRequest
Throws:
Exception