Class PollMethod

  • All Implemented Interfaces:
    org.apache.commons.httpclient.HttpMethod

    public class PollMethod
    extends XMLResponseMethodBase
    Implements the POLL WebDAV method.
    See Also:
    Reference
    • 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()
        Specified by:
        getName in interface org.apache.commons.httpclient.HttpMethod
        Specified by:
        getName in class org.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 interface org.apache.commons.httpclient.HttpMethod
        Overrides:
        recycle in class XMLResponseMethodBase
      • 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 class org.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 interface org.apache.commons.httpclient.HttpMethod
        Overrides:
        setRequestHeader in class org.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 class XMLResponseMethodBase
        Parameters:
        input - Input stream
        Throws:
        java.io.IOException
        org.apache.commons.httpclient.HttpException