本文整理了Java中org.eclipse.jetty.server.Response.flushBuffer
方法的一些代码示例,展示了Response.flushBuffer
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.flushBuffer
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Response
类名称:Response
方法名:flushBuffer
暂无
代码示例来源:origin: jooby-project/jooby
@Override
protected void handshake(final Runnable handler) throws Exception {
/** Infinite timeout because the continuation is never resumed but only completed on close. */
req.getAsyncContext().setTimeout(0L);
/** Server sent events headers. */
rsp.setStatus(HttpServletResponse.SC_OK);
rsp.setHeader("Connection", "Close");
rsp.setContentType("text/event-stream; charset=utf-8");
rsp.flushBuffer();
HttpChannel channel = rsp.getHttpChannel();
Connector connector = channel.getConnector();
Executor executor = connector.getExecutor();
executor.execute(handler);
}
代码示例来源:origin: com.github.tomakehurst/wiremock-jre8
@Override
public void malformedResponseChunk() {
try {
response.setStatus(200);
response.flushBuffer();
socket.getChannel().write(BufferUtil.toBuffer(GARBAGE));
socket.close();
} catch (IOException e) {
throwUnchecked(e);
}
}
代码示例来源:origin: com.github.tomakehurst/wiremock-jre8
@Override
public void malformedResponseChunk() {
try {
response.setStatus(200);
response.flushBuffer();
writeGarbageThenCloseSocket();
} catch (IOException e) {
throwUnchecked(e);
}
}
代码示例来源:origin: jenkinsci/winstone
private void minimalErrorResponse(Throwable failure)
{
try
{
int code = 500;
Integer status=(Integer)_request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE);
if (status!=null)
code = status.intValue();
else
{
Throwable cause = unwrap(failure,BadMessageException.class);
if (cause instanceof BadMessageException)
code = ((BadMessageException)cause).getCode();
}
_response.reset(true);
_response.setStatus(code);
_response.flushBuffer();
}
catch (Throwable x)
{
if (x != failure)
failure.addSuppressed(x);
abort(failure);
}
}
代码示例来源:origin: stackoverflow.com
if (response.setErrorReported()) {
try {
response.flushBuffer();
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
代码示例来源:origin: org.jooby/jooby-jetty
@Override
protected void handshake(final Runnable handler) throws Exception {
/** Infinite timeout because the continuation is never resumed but only completed on close. */
req.getAsyncContext().setTimeout(0L);
/** Server sent events headers. */
rsp.setStatus(HttpServletResponse.SC_OK);
rsp.setHeader("Connection", "Close");
rsp.setContentType("text/event-stream; charset=utf-8");
rsp.flushBuffer();
HttpChannel channel = rsp.getHttpChannel();
Connector connector = channel.getConnector();
Executor executor = connector.getExecutor();
executor.execute(handler);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
if (_etags)
r.getHttpFields().add(HttpHeaders.ETAG_BUFFER,content.getETag());
r.flushBuffer();
return false;
if (_etags)
r.getHttpFields().add(HttpHeaders.ETAG_BUFFER,content.getETag());
r.flushBuffer();
return false;
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
if (_etags)
r.getHttpFields().add(HttpHeaders.ETAG_BUFFER,content.getETag());
r.flushBuffer();
return false;
if (_etags)
r.getHttpFields().add(HttpHeaders.ETAG_BUFFER,content.getETag());
r.flushBuffer();
return false;
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
if (_etags)
r.getHttpFields().add(HttpHeaders.ETAG_BUFFER,content.getETag());
r.flushBuffer();
return false;
if (_etags)
r.getHttpFields().add(HttpHeaders.ETAG_BUFFER,content.getETag());
r.flushBuffer();
return false;
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
r.flushBuffer();
return false;
r.flushBuffer();
return false;
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
r.flushBuffer();
return false;
r.flushBuffer();
return false;
内容来源于网络,如有侵权,请联系作者删除!