Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
Package dev.rafex.ether.websocket.jetty12

Classes

class  JettyWebSocketEndpointAdapter
 Adapta una instancia de WebSocketEndpoint al Listener de Jetty 12.
interface  JettyWebSocketModule
 SPI contract for WebSocket modules that register endpoint routes. More...
class  JettyWebSocketRouteRegistry
 Mutable registry that collects WebSocket routes during module registration. More...
class  JettyWebSocketServerFactory
 Factory that wires a Jetty Server with WebSocket routing. More...
class  JettyWebSocketServerRunner
 Thin wrapper around a Jetty Server that exposes lifecycle methods. More...
class  JettyWebSocketSession
 Jetty 12 implementation of WebSocketSession. More...

Functions

record JettyWebSocketModuleContext (JettyWebSocketServerConfig config)
 Read-only context passed to JettyWebSocketModule#registerRoutes.
record JettyWebSocketServerConfig (int port, int minThreads, int maxThreads, int idleTimeoutMs, String threadPoolName)
 Immutable configuration for the Jetty WebSocket server.

Function Documentation

◆ JettyWebSocketModuleContext()

record dev.rafex.ether.websocket.jetty12.JettyWebSocketModuleContext ( JettyWebSocketServerConfig config)

Read-only context passed to JettyWebSocketModule#registerRoutes.

Wraps the current JettyWebSocketServerConfig so modules can inspect server settings (port, thread pool, etc.) at registration time.

Parameters
configthe server configuration in effect

Definition at line 37 of file JettyWebSocketModuleContext.java.

References JettyWebSocketServerConfig().

Referenced by dev.rafex.ether.websocket.jetty12.JettyWebSocketServerFactory.create(), and dev.rafex.ether.websocket.jetty12.JettyWebSocketModule.registerRoutes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ JettyWebSocketServerConfig()

record dev.rafex.ether.websocket.jetty12.JettyWebSocketServerConfig ( int port,
int minThreads,
int maxThreads,
int idleTimeoutMs,
String threadPoolName )

Immutable configuration for the Jetty WebSocket server.

Encapsulates port, thread pool sizing and idle timeout. Use fromEnv() to populate the values from environment variables.

Parameters
portthe HTTP port the server binds to
minThreadsminimum threads in the Jetty thread pool
maxThreadsmaximum threads in the Jetty thread pool
idleTimeoutMsidle timeout in milliseconds for the thread pool
threadPoolNamethe name prefix for Jetty thread pool threads

Creates a configuration from the current process environment.

Delegates to fromEnv(Map) using System#getenv().

Returns
a config populated from environment variables
See also
#fromEnv(Map)

Creates a configuration from the given environment map.

Recognised keys and their defaults:

  • HTTP_PORT — default 8080
  • HTTP_MIN_THREADS — default 4
  • HTTP_MAX_THREADS — default 32
  • HTTP_IDLE_TIMEOUT_MS — default 30000
  • HTTP_POOL_NAME — default "ether-websocket"
Parameters
envthe environment map to read values from
Returns
a config populated from the map

Parses an integer value, falling back to the default on null, blank or non-numeric input.

Parameters
valuethe raw string to parse
fallbackthe value to use when parsing fails
Returns
the parsed integer, or the fallback

Definition at line 43 of file JettyWebSocketServerConfig.java.

References JettyWebSocketServerConfig().

Referenced by dev.rafex.ether.websocket.jetty12.JettyWebSocketServerFactory.create(), dev.rafex.ether.websocket.jetty12.JettyWebSocketServerFactory.create(), JettyWebSocketModuleContext(), and JettyWebSocketServerConfig().

Here is the call graph for this function:
Here is the caller graph for this function: