org.redkale.net

## 类 Response<C extends Context,R extends Request<C>>

- java.lang.Object
- - org.redkale.net.Response<C,R>

- 类型参数:
    `R` - Request的子类型
  直接已知子类:
    HttpResponse, SncpResponse

      public abstract class Response<C extends Context,R extends Request<C>>
      extends java.lang.Object

  详情见: http://www.redkale.org

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected AsyncConnection` | `channel`
    `protected C` | `context`
    `protected java.util.function.BiConsumer<R,Response<C,R>>` | `recycleListener`
    `protected R` | `request`

  - ### 构造器概要

    构造器
    限定符 | 构造器和说明
    --- | ---
    `protected` | `Response(C context, R request)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `finish()`
    `void` | `finish(boolean kill)`
    `void` | `finish(boolean kill, java.nio.ByteBuffer... buffers)`
    `void` | `finish(boolean kill, java.nio.ByteBuffer buffer)`
    `void` | `finish(java.nio.ByteBuffer... buffers)`
    `void` | `finish(java.nio.ByteBuffer buffer)`
    `C` | `getContext()`
    `protected void` | `init(AsyncConnection channel)`
    `protected void` | `prepare()`
    `protected boolean` | `recycle()`
    `protected void` | `refuseAlive()`
    `protected AsyncConnection` | `removeChannel()`
    `protected <A> void` | `send(java.nio.ByteBuffer[] buffers, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,A> handler)`
    `protected <A> void` | `send(java.nio.ByteBuffer buffer, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,A> handler)`
    `void` | `setRecycleListener(java.util.function.BiConsumer<R,Response<C,R>> recycleListener)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### context

          protected final C extends Context context

    - #### request

          protected final R extends Request<C> request

    - #### channel

          protected AsyncConnection channel

    - #### recycleListener

          protected java.util.function.BiConsumer<R extends Request<C>,Response<C extends Context,R extends Request<C>>> recycleListener

  - ### 构造器详细资料

    - #### Response

          protected Response(C context,
                             R request)

  - ### 方法详细资料

    - #### removeChannel

          protected AsyncConnection removeChannel()

    - #### prepare

          protected void prepare()

    - #### recycle

          protected boolean recycle()

    - #### refuseAlive

          protected void refuseAlive()

    - #### init

          protected void init(AsyncConnection channel)

    - #### setRecycleListener

          public void setRecycleListener(java.util.function.BiConsumer<R,Response<C,R>> recycleListener)

    - #### finish

          public void finish()

    - #### finish

          public void finish(boolean kill)

    - #### finish

          public void finish(java.nio.ByteBuffer buffer)

    - #### finish

          public void finish(boolean kill,
                             java.nio.ByteBuffer buffer)

    - #### finish

          public void finish(java.nio.ByteBuffer... buffers)

    - #### finish

          public void finish(boolean kill,
                             java.nio.ByteBuffer... buffers)

    - #### send

          protected <A> void send(java.nio.ByteBuffer buffer,
                                  A attachment,
                                  java.nio.channels.CompletionHandler<java.lang.Integer,A> handler)

    - #### send

          protected <A> void send(java.nio.ByteBuffer[] buffers,
                                  A attachment,
                                  java.nio.channels.CompletionHandler<java.lang.Integer,A> handler)

    - #### getContext

          public C getContext()