java.lang.Object
com.alibaba.csp.sentinel.transport.command.http.HttpEventTask
所有已实现的接口:
Runnable

public class HttpEventTask extends Object implements Runnable
The task handles incoming command request in HTTP protocol.
作者:
youji.zj, Eric Zhao, Jason Joo
  • 字段详细资料

  • 构造器详细资料

    • HttpEventTask

      public HttpEventTask(Socket socket)
  • 方法详细资料

    • close

      public void close() throws Exception
      抛出:
      Exception
    • run

      public void run()
      指定者:
      run 在接口中 Runnable
    • processPostRequest

      protected static void processPostRequest(InputStream in, com.alibaba.csp.sentinel.command.CommandRequest request) throws RequestException, IOException
      Try to process the body of POST request additionally.
      参数:
      in -
      request -
      抛出:
      RequestException
      IOException
    • parsePostHeaders

      protected static Map<String,String> parsePostHeaders(InputStream in) throws IOException
      Process header line in request
      参数:
      in -
      返回:
      return headers in a Map, null for illegal request
      抛出:
      IOException
    • parseParams

      protected static void parseParams(String queryString, com.alibaba.csp.sentinel.command.CommandRequest request)
      Consume all the body submitted and parse params into CommandRequest
      参数:
      queryString -
      request -
    • processQueryString

      protected static com.alibaba.csp.sentinel.command.CommandRequest processQueryString(String line)
      Parse raw HTTP request line to a CommandRequest.
      参数:
      line - HTTP request line
      返回:
      parsed command request
    • removeAnchor

      protected static String removeAnchor(String str)
      Truncate query from "a=1&b=2#mark" to "a=1&b=2"
      参数:
      str -
      返回:
    • parseSingleParam

      protected static void parseSingleParam(String single, com.alibaba.csp.sentinel.command.CommandRequest request)