Class AjpHttpRequest

All Implemented Interfaces:
AttributeStorage, Cacheable, MimeHeadersPacket

public final class AjpHttpRequest extends HttpRequestPacket
HttpRequestPacket implementation, which also contains AJP related meta data.
Author:
Alexey Stashok
  • Method Details

    • create

      public static AjpHttpRequest create()
    • getAttribute

      public Object getAttribute(String name)
      Overrides:
      getAttribute in class HttpRequestPacket
      Parameters:
      name - Name of the request attribute to return
      Returns:
      the specified request attribute if it exists; otherwise, return null.
    • getLocalPort

      public int getLocalPort()
      Overrides:
      getLocalPort in class HttpRequestPacket
      Returns:
      the Internet Protocol (IP) port number of the interface on which the request was received.
    • getRemotePort

      public int getRemotePort()
      Overrides:
      getRemotePort in class HttpRequestPacket
      Returns:
      the Internet Protocol (IP) source port of the client or last proxy that sent the request.
    • localAddr

      public DataChunk localAddr()
      Overrides:
      localAddr in class HttpRequestPacket
      Returns:
      a DataChunk representing the Internet Protocol (IP) address of the interface on which the request was received.
    • localName

      public DataChunk localName()
      Overrides:
      localName in class HttpRequestPacket
      Returns:
      a DataChunk representing the host name of the Internet Protocol (IP) interface on which the request was received.
    • remoteAddr

      public DataChunk remoteAddr()
      Overrides:
      remoteAddr in class HttpRequestPacket
      Returns:
      the DataChunk representing the Internet Protocol (IP) address of the client or last proxy that sent the request.
    • remoteHostRaw

      public DataChunk remoteHostRaw()
      Returns:
      the current remote host value. Unlike remoteHost(), this method doesn't try to resolve the host name based on the current remoteAddr() value
    • remoteHost

      public DataChunk remoteHost()
      Overrides:
      remoteHost in class HttpRequestPacket
      Returns:
      a DataChunk representing the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the host name (to improve performance), this method returns the the IP address.
    • instanceId

      public DataChunk instanceId()
      Get the instance id (or JVM route). Currently Ajp is sending it with each request. In future this should be fixed, and sent only once ( or 'negotiated' at config time so both tomcat and apache share the same name.
      Returns:
      the instance id
    • getProcessingState

      public ProcessingState getProcessingState()
      Specified by:
      getProcessingState in class HttpHeader
    • getContentBytesRemaining

      public int getContentBytesRemaining()
    • setContentBytesRemaining

      public void setContentBytesRemaining(int contentBytesRemaining)
    • setExpectContent

      public void setExpectContent(boolean isExpectContent)
      Overrides:
      setExpectContent in class HttpHeader
    • doParseHostHeader

      protected void doParseHostHeader()
      Overrides:
      doParseHostHeader in class HttpRequestPacket
    • reset

      protected void reset()
      Description copied from class: HttpRequestPacket
      Reset the internal state.
      Overrides:
      reset in class HttpRequestPacket
    • recycle

      public void recycle()
      Description copied from class: HttpHeader
      Specified by:
      recycle in interface Cacheable
      Overrides:
      recycle in class HttpHeader