public class QueryRequestextends ControlRequest
Represents a UPnP query request for state variables. Extends ControlRequest to provide functionality for querying the value of state variables.
  • Constructor Details

    • QueryRequest

      public QueryRequest()
      /////////////////////////////////////////////
    • QueryRequest

      public QueryRequest(HTTPRequest httpReq)
      Constructs a QueryRequest from an HTTP request.
      Parameters:
      httpReq - the HTTP request to wrap
  • Method Details

    • getVarNameNode

      private Node getVarNameNode()
      Gets the variable name node from the query request.
      Returns:
      the variable name node, or null if not found
    • getVarName

      public String getVarName()
      Gets the name of the state variable being queried.
      Returns:
      the variable name, or empty string if not found
    • 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
    • createContentNode

      private Node createContentNode(StateVariable stateVar)
      Builds the response content node with the variable's value.
      Parameters:
      stateVar - the state variable being queried
      Returns:
      the content node
    • post

      public QueryResponse post()
      Posts the query request and returns the response.
      Returns:
      the query response