本文整理了Java中org.eclipse.jetty.server.Response.newResponseMetaData
方法的一些代码示例,展示了Response.newResponseMetaData
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.newResponseMetaData
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Response
类名称:Response
方法名:newResponseMetaData
暂无
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
/** Get the MetaData.Response committed for this response.
* This may differ from the meta data in this response for
* exceptional responses (eg 4xx and 5xx responses generated
* by the container) and the committedMetaData should be used
* for logging purposes.
* @return The committed MetaData or a {@link #newResponseMetaData()}
* if not yet committed.
*/
public MetaData.Response getCommittedMetaData()
{
MetaData.Response meta = _channel.getCommittedMetaData();
if (meta==null)
return newResponseMetaData();
return meta;
}
代码示例来源:origin: theonedev/onedev
/** Get the MetaData.Response committed for this response.
* This may differ from the meta data in this response for
* exceptional responses (eg 4xx and 5xx responses generated
* by the container) and the committedMetaData should be used
* for logging purposes.
* @return The committed MetaData or a {@link #newResponseMetaData()}
* if not yet committed.
*/
public MetaData.Response getCommittedMetaData()
{
MetaData.Response meta = _channel.getCommittedMetaData();
if (meta==null)
return newResponseMetaData();
return meta;
}
代码示例来源:origin: jenkinsci/winstone
/** Get the MetaData.Response committed for this response.
* This may differ from the meta data in this response for
* exceptional responses (eg 4xx and 5xx responses generated
* by the container) and the committedMetaData should be used
* for logging purposes.
* @return The committed MetaData or a {@link #newResponseMetaData()}
* if not yet committed.
*/
public MetaData.Response getCommittedMetaData()
{
MetaData.Response meta = _channel.getCommittedMetaData();
if (meta==null)
return newResponseMetaData();
return meta;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
protected boolean sendResponse(MetaData.Response info, ByteBuffer content, boolean complete, final Callback callback)
{
boolean committing = _committed.compareAndSet(false, true);
if (committing)
{
// We need an info to commit
if (info==null)
info = _response.newResponseMetaData();
commit(info);
// wrap callback to process 100 responses
final int status=info.getStatus();
final Callback committed = (status<200&&status>=100)?new Commit100Callback(callback):new CommitCallback(callback);
// committing write
_transport.send(info, _request.isHead(), content, complete, committed);
}
else if (info==null)
{
// This is a normal write
_transport.send(null,_request.isHead(), content, complete, callback);
}
else
{
callback.failed(new IllegalStateException("committed"));
}
return committing;
}
代码示例来源:origin: jenkinsci/winstone
info = _response.newResponseMetaData();
commit(info);
内容来源于网络,如有侵权,请联系作者删除!