Package io.micronaut.http.netty.stream
Class DefaultWebSocketHttpResponse
java.lang.Object
io.netty.handler.codec.http.DefaultHttpObject
io.netty.handler.codec.http.DefaultHttpMessage
io.netty.handler.codec.http.DefaultHttpResponse
io.micronaut.http.netty.stream.DefaultWebSocketHttpResponse
- All Implemented Interfaces:
WebSocketHttpResponse
,io.netty.handler.codec.DecoderResultProvider
,io.netty.handler.codec.http.HttpMessage
,io.netty.handler.codec.http.HttpObject
,io.netty.handler.codec.http.HttpResponse
,Processor<io.netty.handler.codec.http.websocketx.WebSocketFrame,
,io.netty.handler.codec.http.websocketx.WebSocketFrame> Publisher<io.netty.handler.codec.http.websocketx.WebSocketFrame>
,Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
@Internal
public class DefaultWebSocketHttpResponse
extends io.netty.handler.codec.http.DefaultHttpResponse
implements WebSocketHttpResponse
A default WebSocket HTTP response.
- Since:
- 1.0
- Author:
- jroper, Graeme Rocher
-
Constructor Summary
ConstructorDescriptionDefaultWebSocketHttpResponse
(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, boolean validateHeaders, Processor<io.netty.handler.codec.http.websocketx.WebSocketFrame, io.netty.handler.codec.http.websocketx.WebSocketFrame> processor, io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory handshakerFactory) DefaultWebSocketHttpResponse
(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, Processor<io.netty.handler.codec.http.websocketx.WebSocketFrame, io.netty.handler.codec.http.websocketx.WebSocketFrame> processor, io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory handshakerFactory) -
Method Summary
Modifier and TypeMethodDescriptionio.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory
Get the handshaker factory to use to reconfigure the channel.void
void
void
onNext
(io.netty.handler.codec.http.websocketx.WebSocketFrame webSocketFrame) void
onSubscribe
(Subscription subscription) void
subscribe
(Subscriber<? super io.netty.handler.codec.http.websocketx.WebSocketFrame> subscriber) Methods inherited from class io.netty.handler.codec.http.DefaultHttpResponse
equals, getStatus, hashCode, setProtocolVersion, setStatus, status, toString
Methods inherited from class io.netty.handler.codec.http.DefaultHttpMessage
getProtocolVersion, headers, protocolVersion
Methods inherited from class io.netty.handler.codec.http.DefaultHttpObject
decoderResult, getDecoderResult, setDecoderResult
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResult
Methods inherited from interface io.netty.handler.codec.http.HttpMessage
getProtocolVersion, headers, protocolVersion
Methods inherited from interface io.netty.handler.codec.http.HttpObject
getDecoderResult
Methods inherited from interface io.netty.handler.codec.http.HttpResponse
getStatus, setProtocolVersion, setStatus, status
-
Constructor Details
-
DefaultWebSocketHttpResponse
public DefaultWebSocketHttpResponse(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, Processor<io.netty.handler.codec.http.websocketx.WebSocketFrame, io.netty.handler.codec.http.websocketx.WebSocketFrame> processor, io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory handshakerFactory) - Parameters:
version
- The Http versionstatus
- The Http response statusprocessor
- TheProcessor
handshakerFactory
- TheWebSocketServerHandshakerFactory
-
DefaultWebSocketHttpResponse
public DefaultWebSocketHttpResponse(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, boolean validateHeaders, Processor<io.netty.handler.codec.http.websocketx.WebSocketFrame, io.netty.handler.codec.http.websocketx.WebSocketFrame> processor, io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory handshakerFactory) - Parameters:
version
- The Http versionvalidateHeaders
- Whether to validate the headersstatus
- The Http response statusprocessor
- TheProcessor
handshakerFactory
- TheWebSocketServerHandshakerFactory
-
-
Method Details
-
handshakerFactory
public io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory handshakerFactory()Description copied from interface:WebSocketHttpResponse
Get the handshaker factory to use to reconfigure the channel.- Specified by:
handshakerFactory
in interfaceWebSocketHttpResponse
- Returns:
- The handshaker factory.
-
subscribe
public void subscribe(Subscriber<? super io.netty.handler.codec.http.websocketx.WebSocketFrame> subscriber) -
onSubscribe
- Specified by:
onSubscribe
in interfaceSubscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onNext
public void onNext(io.netty.handler.codec.http.websocketx.WebSocketFrame webSocketFrame) - Specified by:
onNext
in interfaceSubscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onError
- Specified by:
onError
in interfaceSubscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceSubscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-