Class NettyHttpMessage

java.lang.Object
eu.cloudnetservice.driver.network.netty.http.NettyHttpMessage
Direct Known Subclasses:
NettyHttpServerRequest, NettyHttpServerResponse

public abstract class NettyHttpMessage extends Object
An abstract class which each http message implementation has to override, providing basic access to http version conversion between CloudNet and netty. This class is not a direct subclass of a http message, to prevent the need of a generic type.
Since:
4.0
  • Constructor Details

    • NettyHttpMessage

      public NettyHttpMessage()
  • Method Details

    • versionFromNetty

      @NonNull protected @NonNull HttpVersion versionFromNetty(@NonNull io.netty5.handler.codec.http.HttpVersion httpVersion)
      Converts the given netty http version to its CloudNet association.
      Parameters:
      httpVersion - the netty http version to convert.
      Returns:
      the associated CloudNet http version.
      Throws:
      NullPointerException - if the given netty http version is null.
    • versionToNetty

      @NonNull protected io.netty5.handler.codec.http.HttpVersion versionToNetty(@NonNull @NonNull HttpVersion httpVersion)
      Converts the given CloudNet http version to its netty association.
      Parameters:
      httpVersion - the CloudNet http version to convert.
      Returns:
      the associated netty http version.
      Throws:
      NullPointerException - if the given CloudNet http version is null.