public interface MuWebSocketFactory
A factory that can convert an upgrade request into a web socket.
This is registed with the WebSocketHandlerBuilder.withWebSocketFactory(MuWebSocketFactory)
method.
Modifier and Type | Method and Description |
---|---|
MuWebSocket |
create(MuRequest request,
Headers responseHeaders)
Creates a web socket for an upgrade request.
|
MuWebSocket create(MuRequest request, Headers responseHeaders) throws Exception
request
- An upgrade request.responseHeaders
- Any headers added to this object will be returned with the upgrade response.Exception
- Any thrown exceptions will result in errors being returned to the client. Note that
exceptions such as ClientErrorException
can be used in order to
control the HTTP response codes.Copyright © 2017–2021. All rights reserved.