本文整理了Java中org.glassfish.grizzly.http.server.Request.getInputBuffer
方法的一些代码示例,展示了Request.getInputBuffer
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getInputBuffer
方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Request
类名称:Request
方法名:getInputBuffer
暂无
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Associated Grizzly request.
*
* @param grizzlyRequest Associated Grizzly request
*/
public void setRequest(Request grizzlyRequest) {
this.grizzlyRequest = grizzlyRequest;
this.grizzlyInputBuffer = grizzlyRequest.getInputBuffer();
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server
/**
* Override the default implementation to notify the {@link ReadHandler},
* if available, of any read error that has occurred during processing.
*
* @param ctx event processing {@link FilterChainContext}
* @param error error, which occurred during <tt>FilterChain</tt> execution
*/
@Override
public void exceptionOccurred(final FilterChainContext ctx,
final Throwable error) {
final HttpContext context = HttpContext.get(ctx);
if (context != null) {
final Request request = httpRequestInProgress.get(context);
if (request != null) {
final ReadHandler handler = request.getInputBuffer().getReadHandler();
if (handler != null) {
handler.onError(error);
}
}
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server
public static Object populateCertificateAttribute(final Request request) {
Object certificates = null;
if (request.getRequest().isSecure()) {
if (!request.getRequest().isUpgrade()) {
// It's normal HTTP request, not upgraded one
try {
request.getInputBuffer().fillFully(
request.getHttpFilter().getConfiguration().getMaxBufferedPostSize());
} catch (IOException e) {
throw new IllegalStateException("Can't complete SSL re-negotation", e);
}
}
GrizzlyFuture<Object[]> certFuture =
new CertificateEvent(true).trigger(request.getContext());
try {
// TODO: make the timeout configurable
certificates = certFuture.get(30, TimeUnit.SECONDS);
} catch (Exception e) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE,
"Unable to obtain certificates from peer.",
e);
}
}
request.setAttribute(SSLSupport.CERTIFICATE_KEY, certificates);
}
return certificates;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
request.httpServerFilter, ctx.getConnection(), request);
final InputBuffer inputBuffer = request.getInputBuffer();
if (!inputBuffer.isFinished()) {
inputBuffer.terminate();
代码示例来源:origin: javaee/grizzly
request.httpServerFilter, ctx.getConnection(), request);
final InputBuffer inputBuffer = request.getInputBuffer();
if (!inputBuffer.isFinished()) {
inputBuffer.terminate();
代码示例来源:origin: javaee/grizzly
request.httpServerFilter, ctx.getConnection(), request);
final InputBuffer inputBuffer = request.getInputBuffer();
if (!inputBuffer.isFinished()) {
inputBuffer.terminate();
代码示例来源:origin: javaee/grizzly
request.httpServerFilter, ctx.getConnection(), request);
final InputBuffer inputBuffer = request.getInputBuffer();
if (!inputBuffer.isFinished()) {
inputBuffer.terminate();
代码示例来源:origin: javaee/grizzly
request.httpServerFilter, ctx.getConnection(), request);
final InputBuffer inputBuffer = request.getInputBuffer();
if (!inputBuffer.isFinished()) {
inputBuffer.terminate();
代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server
request.httpServerFilter, ctx.getConnection(), request);
final InputBuffer inputBuffer = request.getInputBuffer();
if (!inputBuffer.isFinished()) {
inputBuffer.terminate();
代码示例来源:origin: javaee/grizzly
public static Object populateCertificateAttribute(final Request request) {
Object certificates = null;
if (request.getRequest().isSecure()) {
if (!request.getRequest().isUpgrade()) {
// It's normal HTTP request, not upgraded one
try {
request.getInputBuffer().fillFully(
request.getHttpFilter().getConfiguration().getMaxBufferedPostSize());
} catch (IOException e) {
throw new IllegalStateException("Can't complete SSL re-negotation", e);
}
}
GrizzlyFuture<Object[]> certFuture =
new CertificateEvent(true).trigger(request.getContext());
try {
// TODO: make the timeout configurable
certificates = certFuture.get(30, TimeUnit.SECONDS);
} catch (Exception e) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE,
"Unable to obtain certificates from peer.",
e);
}
}
request.setAttribute(SSLSupport.CERTIFICATE_KEY, certificates);
}
return certificates;
}
内容来源于网络,如有侵权,请联系作者删除!