Package | Description |
---|---|
org.jim.common.http | |
org.jim.common.http.handler | |
org.jim.common.http.listener | |
org.jim.common.ws | |
org.jim.server.http | |
org.jim.server.http.api | |
org.jim.server.util |
Modifier and Type | Method and Description |
---|---|
static HttpRequest |
HttpRequestDecoder.decode(ByteBuffer buffer,
org.tio.core.ChannelContext channelContext,
boolean isBody) |
HttpRequest |
HttpResponse.getHttpRequestPacket() |
Modifier and Type | Method and Description |
---|---|
static void |
HttpMultiBodyDecoder.decode(HttpRequest request,
RequestLine firstLine,
byte[] bodyBytes,
String initboundary,
org.tio.core.ChannelContext channelContext) |
static HttpMultiBodyDecoder.Step |
HttpMultiBodyDecoder.parseBody(HttpMultiBodyDecoder.Header header,
HttpRequest request,
ByteBuffer buffer,
String boundary,
String endBoundary,
org.tio.core.ChannelContext channelContext) |
static void |
HttpRequestDecoder.parseBodyFormat(HttpRequest httpRequest,
Map<String,String> headers)
Content-Type : application/x-www-form-urlencoded; charset=UTF-8
Content-Type : application/x-www-form-urlencoded; charset=UTF-8
|
void |
HttpResponse.setBody(byte[] body,
HttpRequest request) |
void |
HttpResponse.setBodyAndGzip(byte[] body,
HttpRequest request) |
void |
HttpResponse.setHttpRequestPacket(HttpRequest request) |
Constructor and Description |
---|
HttpResponse(HttpRequest request,
HttpConfig httpConfig) |
Modifier and Type | Method and Description |
---|---|
void |
IHttpRequestHandler.clearStaticResCache(HttpRequest request)
清空静态资源缓存,如果没有缓存,可以不处理
|
HttpResponse |
IHttpRequestHandler.handler(HttpRequest packet,
RequestLine requestLine) |
HttpResponse |
IHttpRequestHandler.resp404(HttpRequest request,
RequestLine requestLine) |
HttpResponse |
IHttpRequestHandler.resp500(HttpRequest request,
RequestLine requestLine,
Throwable throwable) |
Modifier and Type | Method and Description |
---|---|
void |
IHttpServerListener.doAfterHandler(HttpRequest packet,
RequestLine requestLine,
HttpResponse httpResponse)
在执行org.tio.http.server.handler.IHttpRequestHandler.handler(HttpRequestPacket, RequestLine, ChannelContext
|
HttpResponse |
IHttpServerListener.doBeforeHandler(HttpRequest packet,
RequestLine requestLine,
HttpResponse httpResponseFromCache)
在执行org.tio.http.server.handler.IHttpRequestHandler.handler(HttpRequestPacket, RequestLine, ChannelContext
如果返回了HttpResponsePacket对象,则后续都不再执行,表示调用栈就此结束 |
Modifier and Type | Method and Description |
---|---|
HttpRequest |
WsSessionContext.getHandshakeRequestPacket() |
Modifier and Type | Method and Description |
---|---|
void |
WsSessionContext.setHandshakeRequestPacket(HttpRequest handshakeRequestPacket) |
static HttpResponse |
WsServerDecoder.updateWebSocketProtocol(HttpRequest request,
org.tio.core.ChannelContext channelContext)
本方法改编自baseio: https://git.oschina.net/generallycloud/baseio
感谢开源作者的付出 |
Modifier and Type | Method and Description |
---|---|
void |
DefaultHttpRequestHandler.clearStaticResCache(HttpRequest request) |
HttpResponse |
DefaultHttpRequestHandler.handler(HttpRequest request,
RequestLine requestLine) |
HttpResponse |
DefaultHttpRequestHandler.resp404(HttpRequest request,
RequestLine requestLine) |
HttpResponse |
DefaultHttpRequestHandler.resp500(HttpRequest request,
RequestLine requestLine,
Throwable throwable) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
TestController.abtest(HttpRequest request) |
HttpResponse |
TestController.bean(User user,
HttpRequest request) |
HttpResponse |
HttpApiController.chat(HttpRequest request,
HttpConfig httpConfig,
org.tio.core.ChannelContext channelContext) |
HttpResponse |
HttpApiController.close(HttpRequest request,
HttpConfig httpConfig,
org.tio.core.ChannelContext channelContext)
关闭指定用户;
|
HttpResponse |
TestController.filetest_zip(HttpRequest request) |
HttpResponse |
TestController.filetest(HttpRequest request) |
HttpResponse |
TestController.getsession(HttpRequest request) |
HttpResponse |
TestController.html(HttpRequest request) |
HttpResponse |
TestController.json(HttpRequest request) |
HttpResponse |
HttpApiController.online(HttpRequest request,
HttpConfig httpConfig,
org.tio.core.ChannelContext channelContext)
判断用户是否在线接口;
|
HttpResponse |
TestController.plain(String before,
String end,
HttpRequest request) |
HttpResponse |
TestController.post(String before,
String end,
HttpRequest request) |
HttpResponse |
TestController.putsession(String value,
HttpRequest request) |
HttpResponse |
TestController.txt(HttpRequest request) |
HttpResponse |
TestController.upload(UploadFile uploadFile,
String before,
String end,
HttpRequest request)
上传文件测试
|
HttpResponse |
WebImController.webim(HttpRequest request) |
Modifier and Type | Method and Description |
---|---|
static HttpResponse |
HttpResps.css(HttpRequest request,
String bodyString)
Content-Type: text/css; charset=utf-8
|
static HttpResponse |
HttpResps.css(HttpRequest request,
String bodyString,
String charset)
Content-Type: text/css; charset=utf-8
|
static HttpResponse |
HttpResps.file(HttpRequest request,
byte[] bodyBytes,
String extension)
根据文件内容创建响应
|
static HttpResponse |
HttpResps.file(HttpRequest request,
File fileOnServer)
根据文件创建响应
|
static HttpResponse |
HttpResps.fileWithContentType(HttpRequest request,
byte[] bodyBytes,
String contentType) |
static HttpResponse |
HttpResps.fileWithHeaders(HttpRequest request,
byte[] bodyBytes,
Map<String,String> headers,
HttpConfig httpConfig) |
static HttpConfig |
HttpServerUtils.getHttpConfig(HttpRequest request) |
static HttpResponse |
HttpResps.html(HttpRequest request,
String bodyString) |
static HttpResponse |
HttpResps.html(HttpRequest request,
String bodyString,
String charset)
Content-Type: text/html; charset=utf-8
|
static HttpResponse |
HttpResps.js(HttpRequest request,
String bodyString)
Content-Type: application/javascript; charset=utf-8
|
static HttpResponse |
HttpResps.js(HttpRequest request,
String bodyString,
String charset)
Content-Type: application/javascript; charset=utf-8
|
static HttpResponse |
HttpResps.json(HttpRequest request,
Object body)
Content-Type: application/json; charset=utf-8
|
static HttpResponse |
HttpResps.json(HttpRequest request,
Object body,
String charset)
Content-Type: application/json; charset=utf-8
|
static HttpResponse |
HttpResps.redirect(HttpRequest request,
String path)
重定向
|
static HttpResponse |
HttpResps.string(HttpRequest request,
String bodyString,
String Content_Type)
创建字符串输出
|
static HttpResponse |
HttpResps.string(HttpRequest request,
String bodyString,
String charset,
String Content_Type)
创建字符串输出
|
static HttpResponse |
HttpResps.try304(HttpRequest request,
long lastModifiedOnServer)
尝试返回304
|
static HttpResponse |
HttpResps.txt(HttpRequest request,
String bodyString)
Content-Type: text/plain; charset=utf-8
|
static HttpResponse |
HttpResps.txt(HttpRequest request,
String bodyString,
String charset)
Content-Type: text/plain; charset=utf-8
|
Copyright © 2018. All rights reserved.