Class EndpointProxy

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.mitre.dsmiley.httpproxy.ProxyServlet
io.antmedia.rest.servlet.EndpointProxy
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class EndpointProxy extends org.mitre.dsmiley.httpproxy.ProxyServlet
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static org.slf4j.Logger
     
    private final String
     
    private static final long
     

    Fields inherited from class org.mitre.dsmiley.httpproxy.ProxyServlet

    asciiQueryChars, ATTR_TARGET_HOST, ATTR_TARGET_URI, connectionRequestTimeout, connectTimeout, doForwardIP, doHandleCompression, doHandleRedirects, doLog, doPreserveCookiePath, doPreserveCookies, doPreserveHost, doSendUrlFragment, hopByHopHeaders, maxConnections, P_CONNECTIONREQUESTTIMEOUT, P_CONNECTTIMEOUT, P_FORWARDEDFOR, P_HANDLECOMPRESSION, P_HANDLEREDIRECTS, P_LOG, P_MAXCONNECTIONS, P_PRESERVECOOKIEPATH, P_PRESERVECOOKIES, P_PRESERVEHOST, P_READTIMEOUT, P_TARGET_URI, P_USESYSTEMPROPERTIES, readTimeout, targetHost, targetUri, targetUriObj, useSystemProperties

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
    EndpointProxy(String nodeCommunicationHeader)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.http.client.HttpClient
     
    org.apache.http.HttpResponse
    doExecute(jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse servletResponse, org.apache.http.HttpRequest proxyRequest)
     
    protected String
    rewriteUrlFromRequest(jakarta.servlet.http.HttpServletRequest servletRequest)
     
    protected void
    service(jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse servletResponse)
     
    void
    setXForwardedFor(jakarta.servlet.http.HttpServletRequest servletRequest, org.apache.http.HttpRequest proxyRequest)
     

    Methods inherited from class org.mitre.dsmiley.httpproxy.ProxyServlet

    buildHttpClient, buildProxyCookiePath, buildRequestConfig, buildSocketConfig, closeQuietly, copyProxyCookie, copyRequestHeader, copyRequestHeaders, copyResponseEntity, copyResponseHeader, copyResponseHeaders, createProxyCookie, destroy, encodeUriQuery, getConfigParam, getCookieNamePrefix, getHttpClientBuilder, getProxyClient, getProxyCookieName, getRealCookie, getServletInfo, getTargetHost, getTargetUri, getTargetUri, handleRequestException, init, initTarget, newProxyRequestWithEntity, rewritePathInfoFromRequest, rewriteQueryStringFromRequest, rewriteUrlFromResponse

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service

    Methods inherited from class jakarta.servlet.GenericServlet

    getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • log

      protected static org.slf4j.Logger log
    • nodeCommunicationHeader

      private final String nodeCommunicationHeader
  • Constructor Details

    • EndpointProxy

      public EndpointProxy(String nodeCommunicationHeader)
  • Method Details

    • service

      protected void service(jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse servletResponse) throws jakarta.servlet.ServletException, IOException
      Overrides:
      service in class org.mitre.dsmiley.httpproxy.ProxyServlet
      Parameters:
      servletRequest -
      servletResponse -
      Throws:
      jakarta.servlet.ServletException
      IOException - Creates the exact same request with same properties for distributing inside cluster.
    • setXForwardedFor

      public void setXForwardedFor(jakarta.servlet.http.HttpServletRequest servletRequest, org.apache.http.HttpRequest proxyRequest)
    • createHttpClient

      protected org.apache.http.client.HttpClient createHttpClient()
      Overrides:
      createHttpClient in class org.mitre.dsmiley.httpproxy.ProxyServlet
    • doExecute

      public org.apache.http.HttpResponse doExecute(jakarta.servlet.http.HttpServletRequest servletRequest, jakarta.servlet.http.HttpServletResponse servletResponse, org.apache.http.HttpRequest proxyRequest) throws IOException
      Overrides:
      doExecute in class org.mitre.dsmiley.httpproxy.ProxyServlet
      Throws:
      IOException
    • rewriteUrlFromRequest

      protected String rewriteUrlFromRequest(jakarta.servlet.http.HttpServletRequest servletRequest)
      Overrides:
      rewriteUrlFromRequest in class org.mitre.dsmiley.httpproxy.ProxyServlet