org.eclipse.jetty.server.Request.getAsyncContinuation()方法的使用及代码示例

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

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

Request.getAsyncContinuation介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

/**
 * @see org.eclipse.jetty.io.Connection#isSuspended()
 */
public boolean isSuspended()
{
  return _request.getAsyncContinuation().isSuspended();
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

/**
 * @see org.eclipse.jetty.io.Connection#isSuspended()
 */
public boolean isSuspended()
{
  return _request.getAsyncContinuation().isSuspended();
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

/**
 * @see org.eclipse.jetty.io.Connection#isSuspended()
 */
public boolean isSuspended()
{
  return _request.getAsyncContinuation().isSuspended();
}

代码示例来源:origin: org.eclipse.jetty/server

/**
 * @see org.eclipse.jetty.io.Connection#isSuspended()
 */
public boolean isSuspended()
{
  return _request.getAsyncContinuation().isSuspended();
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

/**
 * @see org.eclipse.jetty.io.Connection#isSuspended()
 */
public boolean isSuspended()
{
  return _request.getAsyncContinuation().isSuspended();
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

@Override
public void close() throws IOException
{
  if (_connection instanceof AbstractHttpConnection)
    ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel();
  super.close();
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

@Override
public void close() throws IOException
{
  if (_connection instanceof AbstractHttpConnection)
    ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel();
  super.close();
}

代码示例来源:origin: org.eclipse.jetty/server

@Override
public void close() throws IOException
{
  if (_connection instanceof AbstractHttpConnection)
    ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel();
  super.close();
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

@Override
public void close() throws IOException
{
  if (_connection instanceof AbstractHttpConnection)
    ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel();
  super.close();
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

@Override
public void close() throws IOException
{
  if (_connection instanceof AbstractHttpConnection)
    ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel();
  super.close();
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

public void onInputShutdown() throws IOException
{
  // If we don't have a committed response and we are not suspended
  if (_generator.isIdle() && !_request.getAsyncContinuation().isSuspended())
  {
    // then no more can happen, so close.
    _endp.close();
  }
  // Make idle parser seek EOF
  if (_parser.isIdle())
    _parser.setPersistent(false);
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

public void onInputShutdown() throws IOException
{
  // If we don't have a committed response and we are not suspended
  if (_generator.isIdle() && !_request.getAsyncContinuation().isSuspended())
  {
    // then no more can happen, so close.
    _endp.close();
  }
  // Make idle parser seek EOF
  if (_parser.isIdle())
    _parser.setPersistent(false);
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

public void onInputShutdown() throws IOException
{
  // If we don't have a committed response and we are not suspended
  if (_generator.isIdle() && !_request.getAsyncContinuation().isSuspended())
  {
    // then no more can happen, so close.
    _endp.close();
  }
  // Make idle parser seek EOF
  if (_parser.isIdle())
    _parser.setPersistent(false);
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public void onInputShutdown() throws IOException
{
  // If we don't have a committed response and we are not suspended
  if (_generator.isIdle() && !_request.getAsyncContinuation().isSuspended())
  {
    // then no more can happen, so close.
    _endp.close();
  }
  // Make idle parser seek EOF
  if (_parser.isIdle())
    _parser.setPersistent(false);
}

代码示例来源:origin: org.eclipse.jetty/server

public void onInputShutdown() throws IOException
{
  // If we don't have a committed response and we are not suspended
  if (_generator.isIdle() && !_request.getAsyncContinuation().isSuspended())
  {
    // then no more can happen, so close.
    _endp.close();
  }
  // Make idle parser seek EOF
  if (_parser.isIdle())
    _parser.setPersistent(false);
}

代码示例来源:origin: org.eclipse.jetty/server

@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
{
  AsyncContinuation continuation = baseRequest.getAsyncContinuation();
  if (!continuation.isInitial())
  {
    baseRequest.setDispatchTime(System.currentTimeMillis());
  }
  
  try
  {
    super.handle(target, baseRequest, request, response);
  }
  finally
  {
    if (_requestLog != null && DispatcherType.REQUEST.equals(baseRequest.getDispatcherType()))
    {
      _requestLog.log(baseRequest, (Response)response);
    }
    
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

throws IOException, ServletException
AsyncContinuation continuation = baseRequest.getAsyncContinuation();
if (!continuation.isInitial())

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

public void handleAsync(AbstractHttpConnection connection) throws IOException, ServletException
{
  final AsyncContinuation async = connection.getRequest().getAsyncContinuation();
  final AsyncContinuation.AsyncEventState state = async.getAsyncEventState();
  final Request baseRequest=connection.getRequest();
  final String path=state.getPath();
  if (path!=null)
  {
    // this is a dispatch with a path
    final String contextPath=state.getServletContext().getContextPath();
    HttpURI uri = new HttpURI(URIUtil.addPaths(contextPath,path));
    baseRequest.setUri(uri);
    baseRequest.setRequestURI(null);
    baseRequest.setPathInfo(baseRequest.getRequestURI());
    if (uri.getQuery()!=null)
      baseRequest.mergeQueryString(uri.getQuery()); //we have to assume dispatch path and query are UTF8
  }
  final String target=baseRequest.getPathInfo();
  final HttpServletRequest request=(HttpServletRequest)async.getRequest();
  final HttpServletResponse response=(HttpServletResponse)async.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, baseRequest, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus());
  }
  else
    handle(target, baseRequest, request, response);
}

代码示例来源:origin: org.eclipse.jetty/server

public void handleAsync(AbstractHttpConnection connection) throws IOException, ServletException
{
  final AsyncContinuation async = connection.getRequest().getAsyncContinuation();
  final AsyncContinuation.AsyncEventState state = async.getAsyncEventState();
  final Request baseRequest=connection.getRequest();
  final String path=state.getPath();
  if (path!=null)
  {
    // this is a dispatch with a path
    final String contextPath=state.getServletContext().getContextPath();
    HttpURI uri = new HttpURI(URIUtil.addPaths(contextPath,path));
    baseRequest.setUri(uri);
    baseRequest.setRequestURI(null);
    baseRequest.setPathInfo(baseRequest.getRequestURI());
    if (uri.getQuery()!=null)
      baseRequest.mergeQueryString(uri.getQuery()); //we have to assume dispatch path and query are UTF8
  }
  final String target=baseRequest.getPathInfo();
  final HttpServletRequest request=(HttpServletRequest)async.getRequest();
  final HttpServletResponse response=(HttpServletResponse)async.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, baseRequest, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus());
  }
  else
    handle(target, baseRequest, request, response);
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

public void handleAsync(AbstractHttpConnection connection) throws IOException, ServletException
{
  final AsyncContinuation async = connection.getRequest().getAsyncContinuation();
  final AsyncContinuation.AsyncEventState state = async.getAsyncEventState();
  final Request baseRequest=connection.getRequest();
  final String path=state.getPath();
  if (path!=null)
  {
    // this is a dispatch with a path
    final String contextPath=state.getServletContext().getContextPath();
    HttpURI uri = new HttpURI(URIUtil.addPaths(contextPath,path));
    baseRequest.setUri(uri);
    baseRequest.setRequestURI(null);
    baseRequest.setPathInfo(baseRequest.getRequestURI());
    if (uri.getQuery()!=null)
      baseRequest.mergeQueryString(uri.getQuery()); //we have to assume dispatch path and query are UTF8
  }
  final String target=baseRequest.getPathInfo();
  final HttpServletRequest request=(HttpServletRequest)async.getRequest();
  final HttpServletResponse response=(HttpServletResponse)async.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, baseRequest, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus());
  }
  else
    handle(target, baseRequest, request, response);
}

相关文章

Request类方法