Class HTTPRequest

java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.remoteviz.rendering.HTTPRequest
All Implemented Interfaces:
Cloneable

public class HTTPRequest extends Inventor implements Cloneable
This class encapsulates an HTTP request message received by the service.
  • Constructor Details

    • HTTPRequest

      public HTTPRequest()
      Creates a GET / HTTP/1.1 HTTP request.
    • HTTPRequest

      public HTTPRequest(HTTPRequest obj)
      Copy constructor.
    • HTTPRequest

      public HTTPRequest(String method, String uri, int versionMajor, int versionMinor)
      Creates a HTTP request with the given method, URI (Uniform Resource Identifier) and version.
    • HTTPRequest

      public HTTPRequest(String method, String uri, int versionMajor, int versionMinor, HTTPHeaders headers)
      Creates a HTTP request with the given method, URI (Uniform Resource Identifier), version and headers.
  • Method Details

    • clone

      public Object clone()
    • getURI

      public Uri getURI()
      Returns the URI (Uniform Resource Identifier) being requested.
    • setValue

      public void setValue(HTTPRequest copyFrom)
    • getContentType

      public String getContentType()
      Returns the value of the Content-Type header field.
    • toArray

      public static HTTPRequest[] toArray(long nativeArray, long length)
    • getVersion

      public String getVersion()
      Returns the HTTP version for incoming request (example "HTTP/1.1").
    • getMethod

      public String getMethod()
      Returns the request method ("GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATH").
    • getHeaders

      public HTTPHeaders getHeaders()
      Returns HTTP headers.
    • getHost

      public String getHost()
      Returns the value of the Host header field.
    • getContentLength

      public long getContentLength()
      Returns the value of the Content-Length header field. The value -1 indicates that the length is unknown (Content-Length header is not present).
    • getVersionMinor

      public int getVersionMinor()
      HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol. Returns the version minor.
    • getVersionMajor

      public int getVersionMajor()
      HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol. Returns the version major.