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

Factory that wires a Jetty Server with WebSocket routing. More...

Collaboration diagram for dev.rafex.ether.websocket.jetty12.JettyWebSocketServerFactory:

Static Public Member Functions

static JettyWebSocketServerRunner create (final JettyWebSocketServerConfig config, final JettyWebSocketRouteRegistry routeRegistry)
 Creates a WebSocket server from the given configuration and route registry.
static JettyWebSocketServerRunner create (final JettyWebSocketServerConfig config, final List< JettyWebSocketModule > modules)
 Creates a WebSocket server by invoking all given modules to populate the route registry, then delegates to create(JettyWebSocketServerConfig, JettyWebSocketRouteRegistry).

Detailed Description

Factory that wires a Jetty Server with WebSocket routing.

This utility class provides static factory methods to create a JettyWebSocketServerRunner from a configuration and either a pre-built route registry or a list of JettyWebSocketModule instances.

Definition at line 58 of file JettyWebSocketServerFactory.java.

Member Function Documentation

◆ create() [1/2]

JettyWebSocketServerRunner dev.rafex.ether.websocket.jetty12.JettyWebSocketServerFactory.create ( final JettyWebSocketServerConfig config,
final JettyWebSocketRouteRegistry routeRegistry )
static

Creates a WebSocket server from the given configuration and route registry.

Configures a QueuedThreadPool, a ServerConnector, and a WebSocketUpgradeHandler that maps incoming upgrade requests to the registered endpoints.

Parameters
configthe server configuration (port, threads, timeout)
routeRegistrythe registry containing the WebSocket routes
Returns
a runner that owns the configured Server
Exceptions
NullPointerExceptionif config or routeRegistry is null

Definition at line 75 of file JettyWebSocketServerFactory.java.

References dev.rafex.ether.websocket.jetty12.JettyWebSocketServerConfig().

Referenced by create().

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

◆ create() [2/2]

JettyWebSocketServerRunner dev.rafex.ether.websocket.jetty12.JettyWebSocketServerFactory.create ( final JettyWebSocketServerConfig config,
final List< JettyWebSocketModule > modules )
static

Creates a WebSocket server by invoking all given modules to populate the route registry, then delegates to create(JettyWebSocketServerConfig, JettyWebSocketRouteRegistry).

Parameters
configthe server configuration
modulesthe list of modules whose registerRoutes will be called
Returns
a runner that owns the configured Server

Definition at line 106 of file JettyWebSocketServerFactory.java.

References create(), dev.rafex.ether.websocket.jetty12.JettyWebSocketModuleContext(), and dev.rafex.ether.websocket.jetty12.JettyWebSocketServerConfig().

Here is the call graph for this function:

The documentation for this class was generated from the following file: