This commit is contained in:
Redkale
2017-03-17 14:54:00 +08:00
parent 4b48f85162
commit b1d810188c
5 changed files with 47 additions and 18 deletions

View File

@@ -9,11 +9,11 @@ import java.io.*;
import java.lang.reflect.*;
import java.net.*;
import java.nio.*;
import java.nio.channels.*;
import java.util.*;
import java.util.function.BiConsumer;
import org.redkale.convert.json.*;
import org.redkale.net.http.*;
import org.redkale.util.AsyncHandler;
/**
*
@@ -59,8 +59,11 @@ public interface HttpResponseDesc {
public HttpResponse skipHeader();
//异步输出指定内容
public <A> void sendBody(ByteBuffer buffer, A attachment, CompletionHandler<Integer, A> handler);
public <A> void sendBody(ByteBuffer buffer, A attachment, AsyncHandler<Integer, A> handler);
//创建AsyncHandler实例将非字符串对象以JSON格式输出字符串以文本输出
public AsyncHandler createAsyncHandler();
//关闭HTTP连接如果是keep-alive则不强制关闭
public void finish();