org.cybergarage.upnp.control

## Class QueryRequest

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

-     public class QueryRequest
      extends ControlRequest

  Represents a UPnP query request for state variables. Extends ControlRequest to provide functionality for querying the value of state variables.

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getVarName()` Gets the name of the state variable being queried.
    `QueryResponse` | `post()` Posts the query request and returns the response.
    `void` | `setRequest(StateVariable stateVar)` Sets up the query request for the specified state variable.

    - ### Methods inherited from class org.cybergarage.upnp.control.ControlRequest

      `isActionControl, isQueryControl, setRequestHost`

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

    - #### QueryRequest

          public QueryRequest()

      Default constructor

    - #### QueryRequest

          public QueryRequest(HTTPRequest httpReq)

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

  - ### Method Detail

    - #### getVarName

          public String getVarName()

      Gets the name of the state variable being queried.
      Returns:
        the variable name, or empty string if not found

    - #### post

          public QueryResponse post()

      Posts the query request and returns the response.
      Returns:
        the query response

    - #### setRequest

          public void setRequest(StateVariable stateVar)

      Sets up the query request for the specified state variable. Configures the host, SOAP envelope, and action for the query.
      Parameters:
        `stateVar` - the state variable to query