Class BlockingTestController

java.lang.Object
com.github.fmjsjx.libnetty.example.http.server.BlockingTestController

public class BlockingTestController extends Object
Blocking test controller
  • Constructor Details

    • BlockingTestController

      public BlockingTestController()
  • Method Details

    • getJsons

      public Object getJsons(io.netty.handler.codec.http.QueryStringDecoder query)
      GET /api/jsons
      Parameters:
      query - query
      Returns:
      result
    • postEcho

      public Object postEcho(com.github.fmjsjx.libnetty.http.server.HttpRequestContext ctx, com.fasterxml.jackson.databind.JsonNode value)
      POST /api/echo
      Parameters:
      ctx - the request context
      value - the JSON body value
      Returns:
      the result
    • getNoContent

      public void getNoContent(io.netty.handler.codec.http.QueryStringDecoder query)
      GET /api/no-content
      Parameters:
      query - query
    • getOK

      public CharSequence getOK(io.netty.handler.codec.http.QueryStringDecoder query)
      GET /api/ok
      Parameters:
      query - query
      Returns:
      result
    • getError

      public void getError(OptionalInt test) throws Exception
      GET /api/error
      Parameters:
      test - query parameter test
      Throws:
      Exception - any error occurs