use of com.duangframework.core.common.dto.http.request.HttpRequest in project duangframework by tcrct.
the class MainProcess method doWork.
@Override
public IResponse doWork(IRequest req, IResponse res) throws Exception {
HttpRequest request = (HttpRequest) req;
HttpResponse response = (HttpResponse) res;
if (ToolsKit.isEmpty(request)) {
throw new EmptyNullException("request is null");
}
if (ToolsKit.isEmpty(response)) {
throw new EmptyNullException("response is null");
}
String target = request.getRequestURI().toString();
AsyncContext asyncContext = new AsyncContextThreadImpl(target, request, response);
return asyncContext.complete();
// AsyncContext asyncContext = new AsyncContextQueueImpl(target, request, response);
// return asyncContext.complete();
}
Aggregations