org.cybergarage.upnp.event

## Class SubscriptionRequest

- java.lang.Object
- - org.cybergarage.http.HTTPPacket
  - - org.cybergarage.http.HTTPRequest
    - - org.cybergarage.upnp.event.SubscriptionRequest

-     public class SubscriptionRequest
      extends HTTPRequest

  Represents a UPnP event subscription request.

  This class extends HTTPRequest to handle GENA (General Event Notification Architecture) subscription requests for UPnP event notifications. It manages the subscription process including SUBSCRIBE and UNSUBSCRIBE operations for UPnP services.

  Key features:

  - SUBSCRIBE and UNSUBSCRIBE request handling
  - Service URL resolution and management
  - Subscription ID (SID) management
  - Callback URL handling
  - Timeout and renewal management

  This class is used by UPnP control points to subscribe to event notifications from UPnP services, allowing them to receive updates when service state variables change.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubscriptionRequest()`
    `SubscriptionRequest(HTTPRequest httpReq)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getCallback()`
    `String` | `getNT()`
    `String` | `getSID()`
    `long` | `getTimeout()`
    `boolean` | `hasCallback()`
    `boolean` | `hasNT()`
    `boolean` | `hasSID()`
    `SubscriptionResponse` | `post()`
    `void` | `post(SubscriptionResponse subRes)`
    `void` | `setCallback(String value)`
    `void` | `setNT(String value)`
    `void` | `setRenewRequest(Service service, String uuid, long timeout)`
    `void` | `setSID(String id)`
    `void` | `setSubscribeRequest(Service service, String callback, long timeout)`
    `void` | `setTimeout(long value)`
    `void` | `setUnsubscribeRequest(Service service)`

    - ### Methods inherited from class org.cybergarage.http.HTTPRequest

      `getFirstLineString, getHeader, getHTTPVersion, getLocalAddress, getLocalPort, getMethod, getParameterList, getParameterValue, getRequestHost, getRequestPort, getSocket, getURI, isGetRequest, isHeadRequest, isKeepAlive, isMethod, isNotifyRequest, isPostRequest, isSOAPAction, isSubscribeRequest, isUnsubscribeRequest, parseRequestLine, post, post, post, print, read, returnBadRequest, returnOK, returnResponse, set, setBindHost, setMethod, setRequestHost, setRequestPort, setSocket, setURI, setURI, toString`

    - ### Methods inherited from class org.cybergarage.http.HTTPPacket

      `addHeader, addHeader, clearHeaders, getCacheControl, getCharSet, getConnection, getContent, getContentInputStream, getContentLanguage, getContentLength, getContentRange, getContentRangeFirstPosition, getContentRangeInstanceLength, getContentRangeLastPosition, getContentString, getContentType, getDate, getFirstLine, getFirstLineToken, getHeader, getHeader, getHeaderString, getHeaderValue, getHost, getIntegerHeaderValue, getLongHeaderValue, getNHeaders, getServer, getStringHeaderValue, getStringHeaderValue, getTransferEncoding, getVersion, hasConnection, hasContent, hasContentInputStream, hasContentRange, hasFirstLine, hasHeader, hasTransferEncoding, init, isChunked, isCloseConnection, isKeepAliveConnection, read, set, set, set, set, setCacheControl, setCacheControl, setCacheControl, setConnection, setContent, setContent, setContent, setContent, setContentInputStream, setContentLanguage, setContentLength, setContentRange, setContentType, setDate, setHeader, setHeader, setHeader, setHeader, setHost, setIntegerHeader, setLongHeader, setServer, setStringHeader, setStringHeader, setTransferEncoding, setVersion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SubscriptionRequest

          public SubscriptionRequest()

    - #### SubscriptionRequest

          public SubscriptionRequest(HTTPRequest httpReq)

  - ### Method Detail

    - #### getCallback

          public String getCallback()

    - #### getNT

          public String getNT()

    - #### getSID

          public String getSID()

    - #### getTimeout

          public long getTimeout()

    - #### hasCallback

          public boolean hasCallback()

    - #### hasNT

          public boolean hasNT()

    - #### hasSID

          public boolean hasSID()

    - #### post

          public SubscriptionResponse post()

    - #### post

          public void post(SubscriptionResponse subRes)

    - #### setCallback

          public void setCallback(String value)

    - #### setNT

          public void setNT(String value)

    - #### setRenewRequest

          public void setRenewRequest(Service service,
                                      String uuid,
                                      long timeout)

    - #### setSID

          public void setSID(String id)

    - #### setSubscribeRequest

          public void setSubscribeRequest(Service service,
                                          String callback,
                                          long timeout)

    - #### setTimeout

          public final void setTimeout(long value)

    - #### setUnsubscribeRequest

          public void setUnsubscribeRequest(Service service)