Class ProxyServer

java.lang.Object
io.fluxzero.proxy.ProxyServer

public class ProxyServer extends Object
  • Field Details

    • DEFAULT_MAX_REQUEST_BODY_SIZE

      public static final long DEFAULT_MAX_REQUEST_BODY_SIZE
      Default maximum request body size: 256 MiB
      See Also:
    • DEFAULT_MAX_MULTIPART_REQUEST_BODY_SIZE

      public static final long DEFAULT_MAX_MULTIPART_REQUEST_BODY_SIZE
      Default maximum multipart request body size: 1 GiB
      See Also:
  • Constructor Details

    • ProxyServer

      protected ProxyServer(ProxyRequestHandler proxyHandler, io.undertow.Undertow server, int port, io.fluxzero.common.Registration shutdownRegistration)
  • Method Details

    • main

      public static void main(String[] args)
      Standalone process entry point.

      Do not call this method to embed the proxy in another application. Use start() instead so the caller owns the proxy lifecycle and shutdown order.

    • start

      public static ProxyServer start()
      Starts an embedded proxy server using the configured port and runtime base URL.

      The port is resolved from FLUXZERO_PROXY_PORT, PROXY_PORT, or 8080, in that order. The Fluxzero runtime URL is resolved from FLUXZERO_BASE_URL, FLUX_BASE_URL, or FLUX_URL, in that order. The returned server owns the created Fluxzero client and forward proxy consumer; callers should stop all embedded proxy resources by calling cancel().

      This method does not register a JVM shutdown hook, create a Fluxzero keepalive thread, or set a global Fluxzero application instance. Use main(String[]) for standalone process startup.

      Returns:
      a ProxyServer instance representing the started proxy server and owned embedded resources
    • cancel

      public void cancel()
    • merge

      default io.fluxzero.common.Registration merge(io.fluxzero.common.Registration arg0)