Class ProxyServer
java.lang.Object
io.fluxzero.proxy.ProxyServer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDefault connector idle timeout: 60 secondsstatic final intDefault maximum request and response header size: 1 MiBstatic final intDefault maximum in-flight web requests accepted by the proxy.static final longDefault maximum multipart request body size: 1 GiBstatic final intDefault maximum queued outgoing websocket sends per session.static final longDefault maximum request body size: 256 MiBstatic final intDefault Jetty maximum platform thread count.static final intDefault Jetty minimum platform thread count.static final longDefault websocket idle timeout: 120 secondsstatic final longDefault delay between proxy websocket keep-alive pings: 55 secondsstatic final longDefault time allowed for receiving a proxy websocket keep-alive pong: 10 seconds -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProxyServer(ProxyRequestHandler proxyHandler, org.eclipse.jetty.server.Server server, int port, io.fluxzero.common.Registration shutdownRegistration, boolean gracefulShutdown) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()static voidStandalone process entry point.default io.fluxzero.common.Registrationmerge(io.fluxzero.common.Registration arg0) static ProxyServerstart()Starts an embedded proxy server using the configured port and runtime base URL.
-
Field Details
-
DEFAULT_MAX_REQUEST_BODY_SIZE
public static final long DEFAULT_MAX_REQUEST_BODY_SIZEDefault maximum request body size: 256 MiB- See Also:
-
DEFAULT_MAX_MULTIPART_REQUEST_BODY_SIZE
public static final long DEFAULT_MAX_MULTIPART_REQUEST_BODY_SIZEDefault maximum multipart request body size: 1 GiB- See Also:
-
DEFAULT_MAX_HEADER_SIZE
public static final int DEFAULT_MAX_HEADER_SIZEDefault maximum request and response header size: 1 MiB- See Also:
-
DEFAULT_IDLE_TIMEOUT_MILLIS
public static final long DEFAULT_IDLE_TIMEOUT_MILLISDefault connector idle timeout: 60 seconds- See Also:
-
DEFAULT_MAX_THREADS
public static final int DEFAULT_MAX_THREADSDefault Jetty maximum platform thread count.- See Also:
-
DEFAULT_MIN_THREADS
public static final int DEFAULT_MIN_THREADSDefault Jetty minimum platform thread count.- See Also:
-
DEFAULT_MAX_IN_FLIGHT_WEB_REQUESTS
public static final int DEFAULT_MAX_IN_FLIGHT_WEB_REQUESTSDefault maximum in-flight web requests accepted by the proxy. A value of0disables this guardrail.- See Also:
-
DEFAULT_MAX_PENDING_WEBSOCKET_SENDS
public static final int DEFAULT_MAX_PENDING_WEBSOCKET_SENDSDefault maximum queued outgoing websocket sends per session.- See Also:
-
DEFAULT_WEBSOCKET_IDLE_TIMEOUT_MILLIS
public static final long DEFAULT_WEBSOCKET_IDLE_TIMEOUT_MILLISDefault websocket idle timeout: 120 seconds- See Also:
-
DEFAULT_WEBSOCKET_PING_DELAY_MILLIS
public static final long DEFAULT_WEBSOCKET_PING_DELAY_MILLISDefault delay between proxy websocket keep-alive pings: 55 seconds- See Also:
-
DEFAULT_WEBSOCKET_PING_TIMEOUT_MILLIS
public static final long DEFAULT_WEBSOCKET_PING_TIMEOUT_MILLISDefault time allowed for receiving a proxy websocket keep-alive pong: 10 seconds- See Also:
-
-
Constructor Details
-
ProxyServer
protected ProxyServer(ProxyRequestHandler proxyHandler, org.eclipse.jetty.server.Server server, int port, io.fluxzero.common.Registration shutdownRegistration, boolean gracefulShutdown)
-
-
Method Details
-
main
-
start
Starts an embedded proxy server using the configured port and runtime base URL.The port is resolved from
FLUXZERO_PROXY_PORT,PROXY_PORT, or8080, in that order. The Fluxzero runtime URL is resolved fromFLUXZERO_BASE_URL,FLUX_BASE_URL, orFLUX_URL, in that order. The returned server owns the created Fluxzero client and forward proxy consumer; callers should stop all embedded proxy resources by callingcancel().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)
-