类 DefaultFuture

    • 字段详细资料

      • TIME_OUT_TIMER

        public static final Timer TIME_OUT_TIMER
    • 方法详细资料

      • newFuture

        public static DefaultFuture newFuture​(Channel channel,
                                              Request request,
                                              int timeout,
                                              ExecutorService executor)
        init a DefaultFuture 1.init a DefaultFuture 2.timeout check
        参数:
        channel - channel
        request - the request
        timeout - timeout
        返回:
        a new DefaultFuture
      • hasFuture

        public static boolean hasFuture​(Channel channel)
      • sent

        public static void sent​(Channel channel,
                                Request request)
      • closeChannel

        public static void closeChannel​(Channel channel)
        close a channel when a channel is inactive directly return the unfinished requests.
        参数:
        channel - channel to close
      • received

        public static void received​(Channel channel,
                                    Response response)
      • received

        public static void received​(Channel channel,
                                    Response response,
                                    boolean timeout)
      • cancel

        public void cancel()
      • getRequest

        public Request getRequest()