本文整理了Java中org.simpleframework.http.Response.isCommitted
方法的一些代码示例,展示了Response.isCommitted
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.isCommitted
方法的具体详情如下:
包路径:org.simpleframework.http.Response
类名称:Response
方法名:isCommitted
[英]This can be used to determine whether the Response
has been committed. This is true if the Response
was committed, either due to an explicit invocation of the commit
method or due to the writing of content. If the Response
has committed the reset
method will not work in resetting content already written.
[中]这可用于确定Response
是否已提交。如果由于显式调用commit
方法或由于写入内容而提交了Response
,则是如此。如果Response
已提交,reset
方法将无法重置已写入的内容。
代码示例来源:origin: jersey/jersey
@Override
public void failure(final Throwable error) {
try {
if (!response.isCommitted()) {
response.setCode(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());
response.setDescription(error.getMessage());
}
} finally {
logger.debugLog("failure(...) called");
commit();
rethrow(error);
}
}
代码示例来源:origin: ngallagher/simpleframework
/**
* This can be used to determine whether the <code>Response</code>
* has been committed. This is true if the <code>Response</code>
* was committed, either due to an explicit invocation of the
* <code>commit</code> method or due to the writing of content. If
* the <code>Response</code> has committed the <code>reset</code>
* method will not work in resetting content already written.
*
* @return true if the response has been fully committed
*/
public boolean isCommitted() {
return response.isCommitted();
}
代码示例来源:origin: org.simpleframework/simple
/**
* This can be used to determine whether the <code>Response</code>
* has been committed. This is true if the <code>Response</code>
* was committed, either due to an explicit invocation of the
* <code>commit</code> method or due to the writing of content. If
* the <code>Response</code> has committed the <code>reset</code>
* method will not work in resetting content already written.
*
* @return true if the response has been fully committed
*/
public boolean isCommitted() {
return response.isCommitted();
}
代码示例来源:origin: org.simpleframework/simple-http
/**
* This can be used to determine whether the <code>Response</code>
* has been committed. This is true if the <code>Response</code>
* was committed, either due to an explicit invocation of the
* <code>commit</code> method or due to the writing of content. If
* the <code>Response</code> has committed the <code>reset</code>
* method will not work in resetting content already written.
*
* @return true if the response has been fully committed
*/
public boolean isCommitted() {
return response.isCommitted();
}
代码示例来源:origin: org.glassfish.jersey.containers/jersey-container-simple-http
@Override
public void failure(final Throwable error) {
try {
if (!response.isCommitted()) {
response.setCode(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());
response.setDescription(error.getMessage());
}
} finally {
logger.debugLog("failure(...) called");
commit();
rethrow(error);
}
}
内容来源于网络,如有侵权,请联系作者删除!