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,org.reactivestreams.Processor<io.netty.handler.codec.http.websocketx.WebSocketFrame,io.netty.handler.codec.http.websocketx.WebSocketFrame>,org.reactivestreams.Publisher<io.netty.handler.codec.http.websocketx.WebSocketFrame>,org.reactivestreams.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
-
-
Constructor Summary
Constructors Constructor Description DefaultWebSocketHttpResponse(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, boolean validateHeaders, org.reactivestreams.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, org.reactivestreams.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactoryhandshakerFactory()Get the handshaker factory to use to reconfigure the channel.voidonComplete()voidonError(java.lang.Throwable error)voidonNext(io.netty.handler.codec.http.websocketx.WebSocketFrame webSocketFrame)voidonSubscribe(org.reactivestreams.Subscription subscription)voidsubscribe(org.reactivestreams.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
-
-
-
-
Constructor Detail
-
DefaultWebSocketHttpResponse
public DefaultWebSocketHttpResponse(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, org.reactivestreams.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, org.reactivestreams.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 Detail
-
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(org.reactivestreams.Subscriber<? super io.netty.handler.codec.http.websocketx.WebSocketFrame> subscriber)
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription subscription)
- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onNext
public void onNext(io.netty.handler.codec.http.websocketx.WebSocketFrame webSocketFrame)
- Specified by:
onNextin interfaceorg.reactivestreams.Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onError
public void onError(java.lang.Throwable error)
- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
-
-