Factory that wires a Jetty Server with WebSocket routing.
More...
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). | |
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.
|
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.
| config | the server configuration (port, threads, timeout) |
| routeRegistry | the registry containing the WebSocket routes |
Server | NullPointerException | if config or routeRegistry is null |
Definition at line 75 of file JettyWebSocketServerFactory.java.
References dev.rafex.ether.websocket.jetty12.JettyWebSocketServerConfig().
Referenced by create().
|
static |
Creates a WebSocket server by invoking all given modules to populate the route registry, then delegates to create(JettyWebSocketServerConfig,
JettyWebSocketRouteRegistry).
| config | the server configuration |
| modules | the list of modules whose registerRoutes will be called |
Server Definition at line 106 of file JettyWebSocketServerFactory.java.
References create(), dev.rafex.ether.websocket.jetty12.JettyWebSocketModuleContext(), and dev.rafex.ether.websocket.jetty12.JettyWebSocketServerConfig().