org.glassfish.grizzly.http.server.Request.getResponse()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中org.glassfish.grizzly.http.server.Request.getResponse方法的一些代码示例,展示了Request.getResponse的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getResponse方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Request
类名称:Request
方法名:getResponse

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();
  }
}

相关文章

Request类方法