Package org.apache.webdav.lib.methods
Class PollMethod
- java.lang.Object
-
- org.apache.commons.httpclient.HttpMethodBase
-
- org.apache.webdav.lib.methods.HttpRequestBodyMethodBase
-
- org.apache.webdav.lib.methods.XMLResponseMethodBase
-
- org.apache.webdav.lib.methods.PollMethod
-
- All Implemented Interfaces:
org.apache.commons.httpclient.HttpMethod
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
Constructors Constructor Description PollMethod()
PollMethod(java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addRequestHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.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, org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.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, setDecodeResponseHrefs, 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
abort, addCookieRequestHeader, addHostRequestHeader, addProxyConnectionHeader, addRequestHeader, addRequestHeader, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getEffectiveVersion, getFollowRedirects, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getParams, getPath, getProxyAuthenticationRealm, getProxyAuthState, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isAborted, isConnectionCloseForced, isHttp11, isRequestSent, isStrictMode, processCookieHeaders, processResponseBody, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setResponseStream, setStrictMode, setURI, shouldCloseConnection, validate, writeRequest, writeRequestHeaders, writeRequestLine
-
-
-
-
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
Integer
s
-
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
Integer
s
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceorg.apache.commons.httpclient.HttpMethod
- Specified by:
getName
in classorg.apache.commons.httpclient.HttpMethodBase
-
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 interfaceorg.apache.commons.httpclient.HttpMethod
- Overrides:
recycle
in classXMLResponseMethodBase
-
addRequestHeaders
protected void addRequestHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws java.io.IOException, org.apache.commons.httpclient.HttpException
- Overrides:
addRequestHeaders
in classorg.apache.commons.httpclient.HttpMethodBase
- Throws:
java.io.IOException
org.apache.commons.httpclient.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.- Specified by:
setRequestHeader
in interfaceorg.apache.commons.httpclient.HttpMethod
- Overrides:
setRequestHeader
in classorg.apache.commons.httpclient.HttpMethodBase
-
parseResponse
public void parseResponse(java.io.InputStream input, org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws java.io.IOException, org.apache.commons.httpclient.HttpException
Description copied from class:XMLResponseMethodBase
Parse response.- Overrides:
parseResponse
in classXMLResponseMethodBase
- Parameters:
input
- Input stream- Throws:
java.io.IOException
org.apache.commons.httpclient.HttpException
-
-