-
public interface HttpCallback
The callback for http connection.- 从以下版本开始:
- 2.9
-
-
方法概要
修饰符和类型 方法 说明 void
done(URI uri, HttpResponse responseCode, ByteBuf buf, Throwable error)
Call when http connection finish.HttpHandlerAction
preview(URI uri, HttpResponse response)
Specify what should be done next
-
-
-
方法详细资料
-
done
void done(URI uri, HttpResponse responseCode, ByteBuf buf, Throwable error)
Call when http connection finish.- 参数:
uri
- The connect uri.responseCode
- The response.buf
- Http contexterror
- The error if connect failed.
-
preview
HttpHandlerAction preview(URI uri, HttpResponse response)
Specify what should be done next- 参数:
uri
- Current URIresponse
- The response in current connect. Use it to get headers.- 返回:
null if undo anything.
HttpHandlerAction.CONTINUE
real full context. Even if this is an error page.HttpHandlerAction.RESET_DEPTH
Like *null*. and it will reset depth times.HttpHandlerAction.CANCEL
Cancel this connection.(calldone(URI, HttpResponse, ByteBuf, Throwable)
with a error.)HttpHandlerAction.END
calldone(URI, HttpResponse, ByteBuf, Throwable)
with empty context.HttpHandlerAction.redirect(String)
Redirect to giving url.HttpHandlerAction.redirectAndReset(String)
Redirect to giving url and reset depth times.
-
-