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:
- HttpMethod
- public class PollMethod
- extends XMLResponseMethodBase
Implements the POLL WebDAV method.
- See Also:
- Reference
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, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody |
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 |
PollMethod
public PollMethod()
PollMethod
public PollMethod(java.lang.String path)
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()
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