Implements the SUBSCRIBE method.
addRequestHeaders
protected void addRequestHeaders(HttpState state,
HttpConnection conn)
throws IOException,
HttpException
getCallback
public String getCallback()
getName
public String getName()
getNotificationDelay
public long getNotificationDelay()
getNotificationType
public String getNotificationType()
getResponsedContentLocation
public String getResponsedContentLocation()
Returns the value of the content-location header of the response.
This shall be used to the request uri for a POLL method querying this
subscription.
getResponsedSubscriptionId
public int getResponsedSubscriptionId()
Returns the subscription ID responsed from the server.
- -1 if no subscription id was in the response
getResponsedSubscriptionLifetime
public long getResponsedSubscriptionLifetime()
Returns the subscription lifetime responsed from the server.
- -1 if no subscription lifetime was given in the response
getSubsciptionLifetime
public long getSubsciptionLifetime()
getSubscriptionId
public long getSubscriptionId()
processResponseHeaders
protected void processResponseHeaders(HttpState state,
HttpConnection conn)
setCallback
public void setCallback(String callback)
Sets the URI that's to be notified if the subscribed event does occur.
setNotificationDelay
public void setNotificationDelay(long delay)
Sets the notification delay in seconds.
setNotificationType
public void setNotificationType(String notificationType)
Sets the notification type, i.e. determines the events that are
subscribed.
setRequestHeader
public void setRequestHeader(String headerName,
String headerValue)
Adds special checking of header values of the SUBSCRIBE method to
the super class implementation.
setSubsciptionLifetime
public void setSubsciptionLifetime(long subsciptionLifetime)
Sets the duration of the subscription in seconds.
setSubscriptionId
public void setSubscriptionId(int subscriptionId)
Sets the ID of a subscription to be refreshed.