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

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

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

Request.getContext介绍

[英]Returns the portion of the request URI that indicates the context of the request. The context path always comes first in a request URI. The path starts with a "/" character but does not end with a "/" character. For HttpHandlers in the default (root) context, this method returns "". The container does not decode this string.
[中]返回请求URI中指示请求上下文的部分。在请求URI中,上下文路径总是排在第一位。路径以“/”字符开头,但不以“/”字符结尾。对于默认(根)上下文中的HttpHandler,此方法返回“”。容器不解码此字符串。

代码示例

代码示例来源:origin: javaee/grizzly

@Override
  public void onAfterService(final Request request) {
    // same as request.getContext().flush(this), but less garbage
    request.getContext().notifyDownstream(event);
  }
}

代码示例来源:origin: javaee/grizzly

@Override
  public void onAfterService(final Request request) {
    // same as request.getContext().flush(this), but less garbage
    request.getContext().notifyDownstream(event);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

@Override
  public void onAfterService(final Request request) {
    // same as request.getContext().flush(this), but less garbage
    request.getContext().notifyDownstream(event);
  }
}

代码示例来源:origin: javaee/grizzly

@Override
  public void onAfterService(final Request request) {
    // same as request.getContext().flush(this), but less garbage
    request.getContext().notifyDownstream(event);
  }
}

代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server

@Override
  public void onAfterService(final Request request) {
    // same as request.getContext().flush(this), but less garbage
    request.getContext().notifyDownstream(event);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server

@Override
  public void onAfterService(final Request request) {
    // same as request.getContext().flush(this), but less garbage
    request.getContext().notifyDownstream(event);
  }
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

@Override
  public void onAfterService(final Request request) {
    // same as request.getContext().flush(this), but less garbage
    request.getContext().notifyDownstream(event);
  }
}

代码示例来源:origin: javaee/grizzly

@Override
  public void onAfterService(final Request request) {
    // same as request.getContext().flush(this), but less garbage
    request.getContext().notifyDownstream(event);
  }
}

代码示例来源:origin: javaee/grizzly

NonBlockingDownloadHandler(final Response response,
    final NIOOutputStream outputStream,
    final InputStream inputStream, final int chunkSize) {
  
  this.response = response;
  this.outputStream = outputStream;
  this.inputStream = inputStream;
  mm = response.getRequest().getContext().getMemoryManager();
  this.chunkSize = chunkSize;
}

代码示例来源:origin: javaee/grizzly

NonBlockingDownloadHandler(final Response response,
    final NIOOutputStream outputStream,
    final InputStream inputStream, final int chunkSize) {
  
  this.response = response;
  this.outputStream = outputStream;
  this.inputStream = inputStream;
  mm = response.getRequest().getContext().getMemoryManager();
  this.chunkSize = chunkSize;
}

代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server

NonBlockingDownloadHandler(final Response response,
    final NIOOutputStream outputStream,
    final InputStream inputStream, final int chunkSize) {
  
  this.response = response;
  this.outputStream = outputStream;
  this.inputStream = inputStream;
  mm = response.getRequest().getContext().getMemoryManager();
  this.chunkSize = chunkSize;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server

NonBlockingDownloadHandler(final Response response,
    final NIOOutputStream outputStream,
    final InputStream inputStream, final int chunkSize) {
  
  this.response = response;
  this.outputStream = outputStream;
  this.inputStream = inputStream;
  mm = response.getRequest().getContext().getMemoryManager();
  this.chunkSize = chunkSize;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

NonBlockingDownloadHandler(final Response response,
    final NIOOutputStream outputStream,
    final InputStream inputStream, final int chunkSize) {
  
  this.response = response;
  this.outputStream = outputStream;
  this.inputStream = inputStream;
  mm = response.getRequest().getContext().getMemoryManager();
  this.chunkSize = chunkSize;
}

代码示例来源:origin: javaee/grizzly

NonBlockingDownloadHandler(final Response response,
    final NIOOutputStream outputStream,
    final InputStream inputStream, final int chunkSize) {
  
  this.response = response;
  this.outputStream = outputStream;
  this.inputStream = inputStream;
  mm = response.getRequest().getContext().getMemoryManager();
  this.chunkSize = chunkSize;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server

/**
 * @return <code>true</code> if HTTP/2 push is enabled, otherwise, <code>false</code>.
 */
public boolean isPushEnabled() {
  final Boolean result = (Boolean) getContext().getConnection().getAttributes().getAttribute(HTTP2_PUSH_ENABLED);
  return ((result != null) ? result : false);
}

代码示例来源:origin: javaee/grizzly

/**
 * @return <code>true</code> if HTTP/2 push is enabled, otherwise, <code>false</code>.
 */
public boolean isPushEnabled() {
  final Boolean result = (Boolean) getContext().getConnection().getAttributes().getAttribute(HTTP2_PUSH_ENABLED);
  return ((result != null) ? result : false);
}

代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server

/**
 * @return <code>true</code> if HTTP/2 push is enabled, otherwise, <code>false</code>.
 */
public boolean isPushEnabled() {
  final Boolean result = (Boolean) getContext().getConnection().getAttributes().getAttribute(HTTP2_PUSH_ENABLED);
  return ((result != null) ? result : false);
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * @return <code>true</code> if HTTP/2 push is enabled, otherwise, <code>false</code>.
 */
public boolean isPushEnabled() {
  final Boolean result = (Boolean) getContext().getConnection().getAttributes().getAttribute(HTTP2_PUSH_ENABLED);
  return ((result != null) ? result : false);
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server

@Override
  public Executor getExecutor(final Request request) {
    if (!Threads.isService()) {
      return null; // Execute in the current thread
    }
    return request.getContext().getConnection().getTransport().getWorkerThreadPool();
  }
}

代码示例来源:origin: javaee/grizzly

@Override
  public Executor getExecutor(final Request request) {
    if (!Threads.isService()) {
      return null; // Execute in the current thread
    }
    return request.getContext().getConnection().getTransport().getWorkerThreadPool();
  }
}

相关文章

Request类方法