Class DefaultWebSocketHttpResponse

  • All Implemented Interfaces:
    io.netty.handler.codec.DecoderResultProvider, io.netty.handler.codec.http.HttpMessage, io.netty.handler.codec.http.HttpObject, io.netty.handler.codec.http.HttpResponse, WebSocketHttpResponse, 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>

    public class DefaultWebSocketHttpResponse
    extends io.netty.handler.codec.http.DefaultHttpResponse
    implements WebSocketHttpResponse
    A default WebSocket HTTP response.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory handshakerFactory  
      private org.reactivestreams.Processor<io.netty.handler.codec.http.websocketx.WebSocketFrame,​io.netty.handler.codec.http.websocketx.WebSocketFrame> processor  
    • 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.WebSocketServerHandshakerFactory handshakerFactory()
      Get the handshaker factory to use to reconfigure the channel.
      void onComplete()  
      void onError​(java.lang.Throwable error)  
      void onNext​(io.netty.handler.codec.http.websocketx.WebSocketFrame webSocketFrame)  
      void onSubscribe​(org.reactivestreams.Subscription subscription)  
      void subscribe​(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
      • 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
    • Field Detail

      • processor

        private final org.reactivestreams.Processor<io.netty.handler.codec.http.websocketx.WebSocketFrame,​io.netty.handler.codec.http.websocketx.WebSocketFrame> processor
      • handshakerFactory

        private final io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory handshakerFactory
    • 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)
      • 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)
    • Method Detail

      • 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 interface WebSocketHttpResponse
        Returns:
        The handshaker factory.
      • subscribe

        public void subscribe​(org.reactivestreams.Subscriber<? super io.netty.handler.codec.http.websocketx.WebSocketFrame> subscriber)
        Specified by:
        subscribe in interface org.reactivestreams.Publisher<io.netty.handler.codec.http.websocketx.WebSocketFrame>
      • onSubscribe

        public void onSubscribe​(org.reactivestreams.Subscription subscription)
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
      • onNext

        public void onNext​(io.netty.handler.codec.http.websocketx.WebSocketFrame webSocketFrame)
        Specified by:
        onNext in interface org.reactivestreams.Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
      • onError

        public void onError​(java.lang.Throwable error)
        Specified by:
        onError in interface org.reactivestreams.Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface org.reactivestreams.Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>