本文整理了Java中ro.pippo.core.Response.commit
方法的一些代码示例,展示了Response.commit
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.commit
方法的具体详情如下:
包路径:ro.pippo.core.Response
类名称:Response
方法名:commit
[英]This method commits the response.
[中]此方法提交响应。
代码示例来源:origin: pippo-java/pippo
/**
* This method commits the response.
*/
public void commit() {
commit(null);
}
代码示例来源:origin: pippo-java/pippo
/**
* Writes the string content directly to the response.
* <p>This method commits the response.</p>
*
* @param content
*/
public void send(CharSequence content) {
checkCommitted();
commit(content);
}
代码示例来源:origin: pippo-java/pippo
/**
* Replaces '{}' in the format string with the supplied arguments and
* writes the string content directly to the response.
* <p>This method commits the response.</p>
*
* @param format
* @param args
*/
public void send(String format, Object... args) {
checkCommitted();
commit(StringUtils.format(format, args));
}
代码示例来源:origin: pippo-java/pippo
routeContext.getResponse().commit();
} else {
if (statusCode == HttpConstants.StatusCode.NOT_FOUND) {
代码示例来源:origin: pippo-java/pippo
case HttpConstants.Method.HEAD:
setResponseHeaders(url, routeContext);
routeContext.getResponse().commit();
break;
case HttpConstants.Method.GET:
代码示例来源:origin: pippo-java/pippo
protected void streamResource(URL resourceUrl, RouteContext routeContext) {
try {
long lastModified = resourceUrl.openConnection().getLastModified();
routeContext.getApplication().getHttpCacheToolkit().addEtag(routeContext, lastModified);
if (routeContext.getResponse().getStatus() == HttpConstants.StatusCode.NOT_MODIFIED) {
// do not stream anything out, simply return 304
routeContext.getResponse().commit();
} else {
sendResource(resourceUrl, routeContext);
}
} catch (Exception e) {
throw new PippoRuntimeException(e, "Failed to stream resource {}", resourceUrl);
}
}
代码示例来源:origin: pippo-java/pippo
response.badRequest().commit();
return false;
response.badRequest().commit();
return false;
response.forbidden().commit();
return false;
代码示例来源:origin: pippo-java/pippo
protected void streamResource(URL resourceUrl, RouteContext routeContext) {
try {
setResponseHeaders(resourceUrl, routeContext);
if (routeContext.getResponse().getStatus() == HttpConstants.StatusCode.NOT_MODIFIED) {
// do not stream anything out, simply return 304
routeContext.getResponse().commit();
} else {
sendResource(resourceUrl, routeContext);
}
} catch (IOException e) {
String message = e.getMessage();
if (!StringUtils.isNullOrEmpty(message)) {
log.warn("Error sending resource {} to {}: {}",
resourceUrl, routeContext.getRequest().getClientIp(), message);
} else {
throw new PippoRuntimeException(e, "Failed to stream resource {}", resourceUrl);
}
} catch (Exception e) {
throw new PippoRuntimeException(e, "Failed to stream resource {}", resourceUrl);
}
}
代码示例来源:origin: pippo-java/pippo
response.commit();
代码示例来源:origin: pippo-java/pippo
log.debug("Interceptor set status code to {}, committing response",
routeContext.getResponse().getStatus());
routeContext.getResponse().commit();
routeContext.next();
代码示例来源:origin: gitblit/fathom
context.status(200).getResponse().commit();
} else {
context.status(corsErrorStatus).getResponse().commit();
context.status(corsErrorStatus).getResponse().commit();
代码示例来源:origin: com.gitblit.fathom/fathom-rest
context.status(200).getResponse().commit();
} else {
context.status(corsErrorStatus).getResponse().commit();
context.status(corsErrorStatus).getResponse().commit();
代码示例来源:origin: com.gitblit.fathom/fathom-xmlrpc
context.getResponse().internalError().commit();
代码示例来源:origin: gitblit/fathom
context.getResponse().internalError().commit();
代码示例来源:origin: ro.pippo/pippo-controller
log.debug("Interceptor set status code to {}, committing response",
routeContext.getResponse().getStatus());
routeContext.getResponse().commit();
routeContext.next();
代码示例来源:origin: com.gitblit.fathom/fathom-rest
log.debug("RouteInterceptor set status code to {}, committing response",
context.getResponse().getStatus());
context.getResponse().commit();
context.next();
return;
代码示例来源:origin: gitblit/fathom
log.debug("RouteInterceptor set status code to {}, committing response",
context.getResponse().getStatus());
context.getResponse().commit();
context.next();
return;
内容来源于网络,如有侵权,请联系作者删除!