本文整理了Java中ro.pippo.core.Response.<init>
方法的一些代码示例,展示了Response.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.<init>
方法的具体详情如下:
包路径:ro.pippo.core.Response
类名称:Response
方法名:<init>
暂无
代码示例来源:origin: pippo-java/pippo
public RequestResponse createRequestResponse(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
Request request = new Request(httpServletRequest, application);
Response response = new Response(httpServletResponse, application);
return new RequestResponse(request, response);
}
代码示例来源:origin: pippo-java/pippo
@Override
public RequestResponse createRequestResponse(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
Request request = new Request(httpServletRequest, application);
Response response;
boolean acceptsGZipEncoding = acceptsGZipEncoding(httpServletRequest);
if (acceptsGZipEncoding) {
// the response with be finished in Response.finishGZip() method
GZipResponseWrapper responseWrapper = new GZipResponseWrapper(httpServletResponse);
response = new Response(responseWrapper, application);
} else {
response = new Response(httpServletResponse, application);
}
return new RequestResponse(request, response);
}
代码示例来源:origin: pippo-java/pippo
@Override
public RequestResponse createRequestResponse(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
SessionHttpServletRequest sessionHttpServletRequest = new SessionHttpServletRequest(httpServletRequest, sessionManager);
Request request = new Request(sessionHttpServletRequest, application);
Response response = new Response(httpServletResponse, application);
response.getFinalizeListeners().add(r -> sessionHttpServletRequest.commitSession(httpServletResponse));
return new RequestResponse(request, response);
}
代码示例来源:origin: com.gitblit.fathom/fathom-rest
@Override
public void service(ServletRequest req, ServletResponse resp) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) req;
HttpServletResponse httpResponse = (HttpServletResponse) resp;
Request request = new Request(httpRequest, application);
Response response = new Response(httpResponse, application);
routeDispatcher.dispatch(request, response);
}
代码示例来源:origin: gitblit/fathom
@Override
public void service(ServletRequest req, ServletResponse resp) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) req;
HttpServletResponse httpResponse = (HttpServletResponse) resp;
Request request = new Request(httpRequest, application);
Response response = new Response(httpResponse, application);
routeDispatcher.dispatch(request, response);
}
代码示例来源:origin: gitblit/fathom
protected void doFilterInternal(ServletRequest servletRequest, ServletResponse servletResponse, final FilterChain chain)
throws ServletException, IOException {
try {
super.doFilterInternal(servletRequest, servletResponse, chain);
} catch (Exception exception) {
Exception root = (Exception) Throwables.getRootCause(exception);
Request request = new Request((HttpServletRequest) servletRequest, application);
Response response = new Response((HttpServletResponse) servletResponse, application);
Context routeContext = new Context(application, request, response, Collections.emptyList());
errorHandler.handle(root, routeContext);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!