org.apache.webdav.lib.methods

Class PollMethod


public class PollMethod
extends XMLResponseMethodBase

Implements the POLL WebDAV method.
See Also:
Reference

Nested Class Summary

Nested classes/interfaces 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, decodeResponseHrefs, responseURLs

Constructor Summary

PollMethod()
PollMethod(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.
String
getName()
Collection
getSubscriptionsWithEvents()
Returns a list of number objects containing the subscription IDs for subscriptions for which events are reported.
Collection
getSubscriptionsWithoutEvents()
Returns a list of number objects containing the subscription IDs for subscriptions for which NO events are reported.
void
parseResponse(InputStream input, HttpState state, HttpConnection conn)
void
recycle()
void
setRequestHeader(String headerName, 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, getResponseURLs, getResponses, parseResponse, parseXMLResponse, readResponseBody, recycle, setDebug, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody

Methods inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase

getRequestContentLength, isRequestContentAlreadySet, readContinueCode, recycle, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody, writeRequestBody

Constructor Details

PollMethod

public PollMethod()

PollMethod

public PollMethod(String path)

Method Details

addRequestHeaders

protected void addRequestHeaders(HttpState state,
                                 HttpConnection conn)
            throws IOException,
                   HttpException

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.

getName

public String getName()

getSubscriptionsWithEvents

public 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 Collection getSubscriptionsWithoutEvents()
Returns a list of number objects containing the subscription IDs for subscriptions for which NO events are reported.
Returns:
Collection of Integers

parseResponse

public void parseResponse(InputStream input,
                          HttpState state,
                          HttpConnection conn)
            throws IOException,
                   HttpException
Overrides:
parseResponse in interface XMLResponseMethodBase

recycle

public void recycle()
Overrides:
recycle in interface XMLResponseMethodBase

setRequestHeader

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