本文整理了Java中org.glassfish.grizzly.http.server.Request.getResponse
方法的一些代码示例,展示了Request.getResponse
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getResponse
方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Request
类名称:Request
方法名:getResponse
暂无
代码示例来源:origin: org.glassfish.main.web/web-core
void resumeAfterService() {
if (afterService) {
coyoteRequest.getResponse().resume();
} else {
resume = true;
}
}
代码示例来源:origin: javaee/grizzly
void setAsyncTimeout(long timeout) {
request.getResponse().getSuspendContext().setTimeout(
timeout, MILLISECONDS);
}
代码示例来源:origin: javaee/grizzly
void setAsyncTimeout(long timeout) {
request.getResponse().getSuspendContext().setTimeout(
timeout, MILLISECONDS);
}
代码示例来源:origin: org.glassfish.main.web/web-core
void setAsyncTimeout(long timeout) {
coyoteRequest.getResponse().getSuspendContext().setTimeout(
timeout, TimeUnit.MILLISECONDS);;
}
代码示例来源:origin: javaee/grizzly
void setAsyncTimeout(long timeout) {
request.getResponse().getSuspendContext().setTimeout(
timeout, MILLISECONDS);
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
void setAsyncTimeout(long timeout) {
request.getResponse().getSuspendContext().setTimeout(
timeout, MILLISECONDS);
}
代码示例来源:origin: javaee/grizzly
void setAsyncTimeout(long timeout) {
request.getResponse().getSuspendContext().setTimeout(
timeout, MILLISECONDS);
}
代码示例来源:origin: javaee/grizzly
void setAsyncTimeout(long timeout) {
request.getResponse().getSuspendContext().setTimeout(
timeout, MILLISECONDS);
}
代码示例来源:origin: javaee/grizzly
@Override
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
final Request request = unwrap(req).getRequest();
try {
staticHttpHandlerBase.service(request, request.getResponse());
} catch (IOException ioe) {
throw ioe;
} catch (Exception e) {
throw new ServletException(e);
}
}
代码示例来源:origin: javaee/grizzly
@Override
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
final Request request = unwrap(req).getRequest();
try {
staticHttpHandlerBase.service(request, request.getResponse());
} catch (IOException ioe) {
throw ioe;
} catch (Exception e) {
throw new ServletException(e);
}
}
代码示例来源:origin: javaee/grizzly
@Override
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
final Request request = unwrap(req).getRequest();
try {
staticHttpHandlerBase.service(request, request.getResponse());
} catch (IOException ioe) {
throw ioe;
} catch (Exception e) {
throw new ServletException(e);
}
}
代码示例来源:origin: javaee/grizzly
@Override
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
final Request request = unwrap(req).getRequest();
try {
staticHttpHandlerBase.service(request, request.getResponse());
} catch (IOException ioe) {
throw ioe;
} catch (Exception e) {
throw new ServletException(e);
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
@Override
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
final Request request = unwrap(req).getRequest();
try {
staticHttpHandlerBase.service(request, request.getResponse());
} catch (IOException ioe) {
throw ioe;
} catch (Exception e) {
throw new ServletException(e);
}
}
代码示例来源:origin: javaee/grizzly
@Override
protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
final Request request = unwrap(req).getRequest();
try {
staticHttpHandlerBase.service(request, request.getResponse());
} catch (IOException ioe) {
throw ioe;
} catch (Exception e) {
throw new ServletException(e);
}
}
代码示例来源:origin: javaee/grizzly
void asyncComplete() {
if (isAsyncComplete) {
throw new IllegalStateException("Request already released from asynchronous mode");
}
isAsyncComplete = true;
asyncStarted.set(false);
if (asyncStartedThread != Thread.currentThread() ||
!asyncContext.isOkToConfigure()) {
// it's not safe to just mark response as resumed
request.getResponse().resume();
} else {
final Response.SuspendedContextImpl suspendContext =
(Response.SuspendedContextImpl) request.getResponse().getSuspendContext();
suspendContext.markResumed();
suspendContext.getSuspendStatus().reset();
}
}
代码示例来源:origin: javaee/grizzly
void asyncComplete() {
if (isAsyncComplete) {
throw new IllegalStateException("Request already released from asynchronous mode");
}
isAsyncComplete = true;
asyncStarted.set(false);
if (asyncStartedThread != Thread.currentThread() ||
!asyncContext.isOkToConfigure()) {
// it's not safe to just mark response as resumed
request.getResponse().resume();
} else {
final Response.SuspendedContextImpl suspendContext =
(Response.SuspendedContextImpl) request.getResponse().getSuspendContext();
suspendContext.markResumed();
suspendContext.getSuspendStatus().reset();
}
}
代码示例来源:origin: javaee/grizzly
void asyncComplete() {
if (isAsyncComplete) {
throw new IllegalStateException("Request already released from asynchronous mode");
}
isAsyncComplete = true;
asyncStarted.set(false);
if (asyncStartedThread != Thread.currentThread() ||
!asyncContext.isOkToConfigure()) {
// it's not safe to just mark response as resumed
request.getResponse().resume();
} else {
final Response.SuspendedContextImpl suspendContext =
(Response.SuspendedContextImpl) request.getResponse().getSuspendContext();
suspendContext.markResumed();
suspendContext.getSuspendStatus().reset();
}
}
代码示例来源:origin: javaee/grizzly
void asyncComplete() {
if (isAsyncComplete) {
throw new IllegalStateException("Request already released from asynchronous mode");
}
isAsyncComplete = true;
asyncStarted.set(false);
if (asyncStartedThread != Thread.currentThread() ||
!asyncContext.isOkToConfigure()) {
// it's not safe to just mark response as resumed
request.getResponse().resume();
} else {
final Response.SuspendedContextImpl suspendContext =
(Response.SuspendedContextImpl) request.getResponse().getSuspendContext();
suspendContext.markResumed();
suspendContext.getSuspendStatus().reset();
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
void asyncComplete() {
if (isAsyncComplete) {
throw new IllegalStateException("Request already released from asynchronous mode");
}
isAsyncComplete = true;
asyncStarted.set(false);
if (asyncStartedThread != Thread.currentThread() ||
!asyncContext.isOkToConfigure()) {
// it's not safe to just mark response as resumed
request.getResponse().resume();
} else {
final Response.SuspendedContextImpl suspendContext =
(Response.SuspendedContextImpl) request.getResponse().getSuspendContext();
suspendContext.markResumed();
suspendContext.getSuspendStatus().reset();
}
}
代码示例来源:origin: org.glassfish.main.web/web-core
void asyncComplete() {
asyncStarted.set(false);
if (asyncStartedThread != Thread.currentThread() ||
!asyncContext.isOkToConfigure()) {
// it's not safe to just mark response as resumed
coyoteRequest.getResponse().resume();
} else {
// This code is called if we startAsync and complete in the service() thread.
// So instead of resuming the suspendedContext (which will finish the response processing),
// we just have to mark the context as resumed like it has never been suspended.
final SuspendedContextImpl suspendContext =
(SuspendedContextImpl) coyoteRequest.getResponse().getSuspendContext();
suspendContext.markResumed();
suspendContext.getSuspendStatus().reset();
}
}
内容来源于网络,如有侵权,请联系作者删除!