Class ProxyHTTPRequest

java.lang.Object
org.omegazero.common.util.SimpleAttachmentContainer
org.omegazero.http.common.HTTPHeaderContainer
org.omegazero.http.common.HTTPMessage
org.omegazero.http.common.HTTPRequest
org.omegazero.proxy.http.ProxyHTTPRequest
All Implemented Interfaces:
Serializable, org.omegazero.common.util.AttachmentContainer

public class ProxyHTTPRequest extends org.omegazero.http.common.HTTPRequest
A HTTPRequest that stores the initial request line values and contains additional proxy-specific methods.

The getInitial* methods in this class are not affected by their corresponding set* methods.

Since:
3.6.1
See Also:
  • Field Summary

    Fields inherited from class org.omegazero.http.common.HTTPRequest

    authority, httpResponder, method, path, scheme

    Fields inherited from class org.omegazero.http.common.HTTPMessage

    chunkedTransfer, createdTime, httpVersion, locked, other

    Fields inherited from class org.omegazero.http.common.HTTPHeaderContainer

    headerFields

    Fields inherited from class org.omegazero.common.util.SimpleAttachmentContainer

    attachments
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProxyHTTPRequest(String method, String scheme, String authority, String path, String version, org.omegazero.http.common.HTTPHeaderContainer headers)
    See HTTPRequest(String, String, String, String, String, HTTPHeaderContainer).
    See HTTPRequest(HTTPRequest).
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the initial HTTP request authority.
    Returns the initial HTTP version.
    Returns the initial HTTP request method.
    Returns the initial HTTP request path.
    Returns the initial HTTP request scheme.
    Returns the request ID of this ProxyHTTPRequest.
    void
    respondError(int status, String message, String... headers)
    Responds to this HTTPRequest with an error message.
    void
    respondError(int status, String title, String message, String... headers)
    Responds to this HTTPRequest with an error message.

    Methods inherited from class org.omegazero.http.common.HTTPRequest

    getAuthority, getHttpResponder, getMethod, getOther, getPath, getScheme, hasResponse, requestLine, requestURI, respond, respond, setAuthority, setHttpResponder, setMethod, setPath, setScheme

    Methods inherited from class org.omegazero.http.common.HTTPMessage

    checkLocked, getCreatedTime, getHttpVersion, isChunkedTransfer, isLocked, lock, setChunkedTransfer, setHttpVersion, setOther

    Methods inherited from class org.omegazero.http.common.HTTPHeaderContainer

    addHeader, addHeader, appendHeader, appendHeader, appendHeader, deleteHeader, deleteHeader, editHeader, extractHeader, extractHeaders, fromLegacy, getHeader, getHeader, getHeader, getHeader, getHeaderCount, headerExists, headerIterator, headerNameCount, headerNameSet, headers, headerSet, setHeader, toString

    Methods inherited from class org.omegazero.common.util.SimpleAttachmentContainer

    getAttachment, hasAttachment, removeAttachment, setAttachment

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.omegazero.common.util.AttachmentContainer

    requireAttachment
  • Constructor Details

    • ProxyHTTPRequest

      public ProxyHTTPRequest(String method, String scheme, String authority, String path, String version, org.omegazero.http.common.HTTPHeaderContainer headers)
      See HTTPRequest(String, String, String, String, String, HTTPHeaderContainer).
      Parameters:
      method - The request method
      scheme - The request URL scheme
      authority - The request URL authority
      path - The request URL path component
      version - The HTTP version
      headers - The HTTP headers
    • ProxyHTTPRequest

      public ProxyHTTPRequest(ProxyHTTPRequest request)
      See HTTPRequest(HTTPRequest).
      Parameters:
      request - The ProxyHTTPRequest to copy from
  • Method Details

    • respondError

      public void respondError(int status, String message, String... headers)
      Responds to this HTTPRequest with an error message.
      Parameters:
      status - The status code of the response
      message - Error message
      headers - Headers to send in the response
      See Also:
    • respondError

      public void respondError(int status, String title, String message, String... headers)
      Responds to this HTTPRequest with an error message.
      Parameters:
      status - The status code of the response
      title - Title of the error message
      message - Error message
      headers - Headers to send in the response
      See Also:
    • getRequestId

      public String getRequestId()
      Returns the request ID of this ProxyHTTPRequest.
      Returns:
      The request ID
    • getInitialMethod

      public String getInitialMethod()
      Returns the initial HTTP request method. See HTTPRequest.getMethod().
      Returns:
      The initial HTTP request method
    • getInitialScheme

      public String getInitialScheme()
      Returns the initial HTTP request scheme. See HTTPRequest.getScheme().
      Returns:
      The initial HTTP request scheme
    • getInitialAuthority

      public String getInitialAuthority()
      Returns the initial HTTP request authority. See HTTPRequest.getAuthority().
      Returns:
      The initial HTTP request authority
    • getInitialPath

      public String getInitialPath()
      Returns the initial HTTP request path. See HTTPRequest.getPath().
      Returns:
      The initial HTTP request path
    • getInitialHttpVersion

      public String getInitialHttpVersion()
      Returns the initial HTTP version. See HTTPMessage.getHttpVersion().
      Returns:
      The initial HTTP version