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
ConstructorsConstructorDescriptionDefaultWebSocketHttpResponse(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.WebSocketServerHandshakerFactoryGet the handshaker factory to use to reconfigure the channel.voidvoidvoidonNext(io.netty.handler.codec.http.websocketx.WebSocketFrame webSocketFrame) voidonSubscribe(Subscription subscription) voidsubscribe(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, toStringMethods inherited from class io.netty.handler.codec.http.DefaultHttpMessage
getProtocolVersion, headers, protocolVersionMethods inherited from class io.netty.handler.codec.http.DefaultHttpObject
decoderResult, getDecoderResult, setDecoderResultMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResultMethods inherited from interface io.netty.handler.codec.http.HttpMessage
getProtocolVersion, headers, protocolVersionMethods inherited from interface io.netty.handler.codec.http.HttpObject
getDecoderResultMethods 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- TheProcessorhandshakerFactory- 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- TheProcessorhandshakerFactory- TheWebSocketServerHandshakerFactory
-
-
Method Details
-
handshakerFactory
public io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory handshakerFactory()Description copied from interface:WebSocketHttpResponseGet the handshaker factory to use to reconfigure the channel.- Specified by:
handshakerFactoryin interfaceWebSocketHttpResponse- Returns:
- The handshaker factory.
-
subscribe
public void subscribe(Subscriber<? super io.netty.handler.codec.http.websocketx.WebSocketFrame> subscriber) -
onSubscribe
- Specified by:
onSubscribein interfaceSubscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onNext
public void onNext(io.netty.handler.codec.http.websocketx.WebSocketFrame webSocketFrame) - Specified by:
onNextin interfaceSubscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onError
- Specified by:
onErrorin interfaceSubscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceSubscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-