org.cybergarage.upnp.control

## Class ControlRequest

- java.lang.Object
- - org.cybergarage.http.HTTPPacket
  - - org.cybergarage.http.HTTPRequest
    - - org.cybergarage.soap.SOAPRequest
      - - org.cybergarage.upnp.control.ControlRequest

- Direct Known Subclasses:
    ActionRequest, QueryRequest

      public class ControlRequest
      extends SOAPRequest

  Base class for UPnP control requests. Extends SOAPRequest to provide functionality for handling both action and query control requests.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ControlRequest()` Default constructor
    `ControlRequest(HTTPRequest httpReq)` Constructs a ControlRequest from an HTTP request.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isActionControl()` Checks if this is an action control request.
    `boolean` | `isQueryControl()` Checks if this is a query control request.
    `protected void` | `setRequestHost(Service service)` Sets the request host and port for the specified service.

    - ### Methods inherited from class org.cybergarage.soap.SOAPRequest

      `getBodyNode, getEnvelopeNode, getSOAPAction, isSOAPAction, postMessage, print, setContent, setEnvelopeNode, setSOAPAction`

    - ### 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, 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

    - #### ControlRequest

          public ControlRequest()

      Default constructor

    - #### ControlRequest

          public ControlRequest(HTTPRequest httpReq)

      Constructs a ControlRequest from an HTTP request.
      Parameters:
        `httpReq` - the HTTP request to wrap

  - ### Method Detail

    - #### isActionControl

          public boolean isActionControl()

      Checks if this is an action control request.
      Returns:
        true if this is an action request, false otherwise

    - #### isQueryControl

          public boolean isQueryControl()

      Checks if this is a query control request.
      Returns:
        true if this is a query request, false otherwise

    - #### setRequestHost

          protected void setRequestHost(Service service)

      Sets the request host and port for the specified service. Handles various edge cases including absolute URLs, missing URLBase, and IPv6 service types.
      Parameters:
        `service` - the service to set the host for