org.apache.webdav.lib.methods
Class PollMethod

java.lang.Object
  extended byorg.apache.commons.httpclient.HttpMethodBase
      extended byorg.apache.webdav.lib.methods.HttpRequestBodyMethodBase
          extended byorg.apache.webdav.lib.methods.XMLResponseMethodBase
              extended byorg.apache.webdav.lib.methods.PollMethod
All Implemented Interfaces:
HttpMethod

public class PollMethod
extends XMLResponseMethodBase

Implements the POLL WebDAV method.

See Also:
Reference

Nested Class Summary
 
Nested classes inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
XMLResponseMethodBase.OptionsResponse, XMLResponseMethodBase.Response, XMLResponseMethodBase.ResponseWithinMultistatus, XMLResponseMethodBase.SingleResponse
 
Field Summary
 
Fields inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
builder, responseURLs
 
Fields inherited from class org.apache.commons.httpclient.HttpMethodBase
USER_AGENT
 
Constructor Summary
PollMethod()
           
PollMethod(java.lang.String path)
           
 
Method Summary
protected  void addRequestHeaders(HttpState state, HttpConnection conn)
           
 void addSubscriptionId(int id)
          Adds an ID for a subscription that is to be polled.
 java.lang.String getName()
           
 java.util.Collection getSubscriptionsWithEvents()
          Returns a list of number objects containing the subscription IDs for subscriptions for which events are reported.
 java.util.Collection getSubscriptionsWithoutEvents()
          Returns a list of number objects containing the subscription IDs for subscriptions for which NO events are reported.
 void parseResponse(java.io.InputStream input, HttpState state, HttpConnection conn)
          Parse response.
 void recycle()
          Reset the State of the class to its initial state, so that it can be used again.
 void setRequestHeader(java.lang.String headerName, java.lang.String headerValue)
          Adds special checking of header values of the POLL method to the super class implementation.
 
Methods inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
convertElementToProperty, generateRequestBody, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponses, getResponseURLs, parseXMLResponse, readResponseBody, setDebug, setDocument, setResponseHashtable, writeRequestBody
 
Methods inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase
isRequestContentAlreadySet, readContinueCode, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody
 
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
addAuthorizationRequestHeader, addContentLengthRequestHeader, addCookieRequestHeader, addHostRequestHeader, addProxyAuthorizationRequestHeader, addProxyConnectionHeader, addRequestHeader, addRequestHeader, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, fakeResponse, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getFollowRedirects, getHostConfiguration, getMethodRetryHandler, getPath, getProxyAuthenticationRealm, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isConnectionCloseForced, isHttp11, isStrictMode, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setPath, setQueryString, setQueryString, setRequestHeader, setResponseStream, setStrictMode, shouldCloseConnection, validate, writeRequest, writeRequestHeaders, writeRequestLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollMethod

public PollMethod()

PollMethod

public PollMethod(java.lang.String path)
Method Detail

addSubscriptionId

public void addSubscriptionId(int id)
Adds an ID for a subscription that is to be polled. All added subscription IDs should have the got same Content-Location uri from the SUBSCRIBE method.


getSubscriptionsWithEvents

public java.util.Collection getSubscriptionsWithEvents()
Returns a list of number objects containing the subscription IDs for subscriptions for which events are reported.

Returns:
Collection of Integers

getSubscriptionsWithoutEvents

public java.util.Collection getSubscriptionsWithoutEvents()
Returns a list of number objects containing the subscription IDs for subscriptions for which NO events are reported.

Returns:
Collection of Integers

getName

public java.lang.String getName()

recycle

public void recycle()
Description copied from class: XMLResponseMethodBase
Reset the State of the class to its initial state, so that it can be used again.

Specified by:
recycle in interface HttpMethod
Overrides:
recycle in class XMLResponseMethodBase

addRequestHeaders

protected void addRequestHeaders(HttpState state,
                                 HttpConnection conn)
                          throws java.io.IOException,
                                 HttpException
Throws:
java.io.IOException
HttpException

setRequestHeader

public void setRequestHeader(java.lang.String headerName,
                             java.lang.String headerValue)
Adds special checking of header values of the POLL method to the super class implementation.


parseResponse

public void parseResponse(java.io.InputStream input,
                          HttpState state,
                          HttpConnection conn)
                   throws java.io.IOException,
                          HttpException
Description copied from class: XMLResponseMethodBase
Parse response.

Overrides:
parseResponse in class XMLResponseMethodBase
Parameters:
input - Input stream
Throws:
java.io.IOException
HttpException