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

    Constructors
    Constructor
    Description
    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)
     
    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 Type
    Method
    Description
    io.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 version
      status - The Http response status
      processor - The Processor
      handshakerFactory - The WebSocketServerHandshakerFactory
    • 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 version
      validateHeaders - Whether to validate the headers
      status - The Http response status
      processor - The Processor
      handshakerFactory - The WebSocketServerHandshakerFactory
  • 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 interface WebSocketHttpResponse
      Returns:
      The handshaker factory.
    • subscribe

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

      public void onSubscribe(Subscription subscription)
      Specified by:
      onSubscribe in interface 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 Subscriber<io.netty.handler.codec.http.websocketx.WebSocketFrame>
    • onError

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

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