public class SubscribeMethod extends XMLResponseMethodBase implements DepthSupport
XMLResponseMethodBase.OptionsResponse, XMLResponseMethodBase.Response, XMLResponseMethodBase.ResponseWithinMultistatus, XMLResponseMethodBase.SingleResponse
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TYPE_DELETE |
static java.lang.String |
TYPE_MOVE |
static java.lang.String |
TYPE_UPDATE |
static java.lang.String |
TYPE_UPDATE_NEW_MEMBER |
builder, decodeResponseHrefs, responseURLs
effectiveVersion, statusLine
DEPTH_0, DEPTH_1, DEPTH_INFINITY
Constructor and Description |
---|
SubscribeMethod() |
SubscribeMethod(java.lang.String path) |
Modifier and Type | Method and Description |
---|---|
protected void |
addRequestHeaders(org.apache.commons.httpclient.HttpState state,
org.apache.commons.httpclient.HttpConnection conn) |
java.lang.String |
getCallback() |
int |
getDepth()
Depth getter.
|
java.lang.String |
getName() |
long |
getNotificationDelay() |
java.lang.String |
getNotificationType() |
java.lang.String |
getResponsedContentLocation()
Returns the value of the content-location header of the response.
|
int |
getResponsedSubscriptionId()
Returns the subscription ID responsed from the server.
|
long |
getResponsedSubscriptionLifetime()
Returns the subscription lifetime responsed from the server.
|
long |
getSubsciptionLifetime() |
long |
getSubscriptionId() |
protected void |
processResponseHeaders(org.apache.commons.httpclient.HttpState state,
org.apache.commons.httpclient.HttpConnection conn) |
void |
recycle()
Reset the State of the class to its initial state, so that it can be
used again.
|
void |
setCallback(java.lang.String callback)
Sets the URI that's to be notified if the subscribed event does occur.
|
void |
setDepth(int depth)
Sets the depth.
|
void |
setNotificationDelay(long delay)
Sets the notification delay in seconds.
|
void |
setNotificationType(java.lang.String notificationType)
Sets the notification type, i.e.
|
void |
setRequestHeader(java.lang.String headerName,
java.lang.String headerValue)
Adds special checking of header values of the SUBSCRIBE method to
the super class implementation.
|
void |
setSubsciptionLifetime(long subsciptionLifetime)
Sets the duration of the subscription in seconds.
|
void |
setSubscriptionId(int subscriptionId)
Sets the ID of a subscription to be refreshed.
|
convertElementToProperty, generateRequestBody, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponses, getResponseURLs, parseResponse, parseXMLResponse, readResponseBody, setDebug, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody
isRequestContentAlreadySet, readContinueCode, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody
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, 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
public static final java.lang.String TYPE_UPDATE
public static final java.lang.String TYPE_UPDATE_NEW_MEMBER
public static final java.lang.String TYPE_DELETE
public static final java.lang.String TYPE_MOVE
public SubscribeMethod()
public SubscribeMethod(java.lang.String path)
public java.lang.String getCallback()
public void setCallback(java.lang.String callback)
public java.lang.String getNotificationType()
public void setNotificationType(java.lang.String notificationType)
TYPE_DELETE
,
TYPE_MOVE
,
TYPE_UPDATE
,
TYPE_UPDATE_NEW_MEMBER
public long getSubsciptionLifetime()
public void setSubsciptionLifetime(long subsciptionLifetime)
public long getSubscriptionId()
public void setSubscriptionId(int subscriptionId)
subscriptionId
- public void setNotificationDelay(long delay)
public long getNotificationDelay()
public int getDepth()
DepthSupport
getDepth
in interface DepthSupport
public void setDepth(int depth)
setDepth
in interface DepthSupport
depth
- New depth valuepublic int getResponsedSubscriptionId()
public long getResponsedSubscriptionLifetime()
public java.lang.String getResponsedContentLocation()
public java.lang.String getName()
getName
in interface org.apache.commons.httpclient.HttpMethod
getName
in class org.apache.commons.httpclient.HttpMethodBase
public void recycle()
XMLResponseMethodBase
recycle
in interface org.apache.commons.httpclient.HttpMethod
recycle
in class XMLResponseMethodBase
protected void addRequestHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn) throws java.io.IOException, org.apache.commons.httpclient.HttpException
addRequestHeaders
in class org.apache.commons.httpclient.HttpMethodBase
java.io.IOException
org.apache.commons.httpclient.HttpException
public void setRequestHeader(java.lang.String headerName, java.lang.String headerValue)
setRequestHeader
in interface org.apache.commons.httpclient.HttpMethod
setRequestHeader
in class org.apache.commons.httpclient.HttpMethodBase
protected void processResponseHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn)
processResponseHeaders
in class org.apache.commons.httpclient.HttpMethodBase