private static void fillRequest( ServiceRequestContext ctx, AggregatedHttpMessage aReq, Request jReq) { jReq.setDispatcherType(DispatcherType.REQUEST); jReq.setAsyncSupported(false, "armeria"); jReq.setSecure(ctx.sessionProtocol().isTls()); jReq.setMetaData(toRequestMetadata(ctx, aReq)); final HttpData content = aReq.content(); if (!content.isEmpty()) { jReq.getHttpInput().addContent(new Content(ByteBuffer.wrap( content.array(), content.offset(), content.length()))); } jReq.getHttpInput().eof(); }
@Override public boolean messageComplete() { _request.getHttpInput().shutdown(); return true; }
@Override public boolean messageComplete() { _request.getHttpInput().shutdown(); return true; }
@Override public boolean earlyEOF() { _request.getHttpInput().earlyEOF(); return false; }
@Override public boolean earlyEOF() { _request.getHttpInput().earlyEOF(); return false; }
@Override public void earlyEOF() { _request.getHttpInput().earlyEOF(); }
public boolean onEarlyEOF() { return _request.getHttpInput().earlyEOF(); }
public boolean onEarlyEOF() { return _request.getHttpInput().earlyEOF(); }
protected void consumeInput() { getRequest().getHttpInput().consumeAll(); }
public void onBlockWaitForContentFailure(Throwable failure) { getRequest().getHttpInput().failed(failure); }
@Override public boolean content(T item) { if (LOG.isDebugEnabled()) LOG.debug("{} content {}", this, item); @SuppressWarnings("unchecked") HttpInput<T> input = (HttpInput<T>)_request.getHttpInput(); input.content(item); return true; }
public boolean onContent(HttpInput.Content content) { if (LOG.isDebugEnabled()) LOG.debug("{} content {}", this, content); return _request.getHttpInput().addContent(content); }
public boolean onRequestComplete() { if (LOG.isDebugEnabled()) LOG.debug("{} onRequestComplete", this); return _request.getHttpInput().eof(); }
@Override public boolean content(T item) { if (LOG.isDebugEnabled()) LOG.debug("{} content {}", this, item); @SuppressWarnings("unchecked") HttpInput<T> input = (HttpInput<T>)_request.getHttpInput(); input.content(item); return true; }
@Override public boolean content(T item) { if (LOG.isDebugEnabled()) LOG.debug("{} content {}", this, item); @SuppressWarnings("unchecked") HttpInput<T> input = (HttpInput<T>)_request.getHttpInput(); input.content(item); return false; }
@Override public boolean messageComplete() { if (LOG.isDebugEnabled()) LOG.debug("{} messageComplete", this); _request.getHttpInput().messageComplete(); return true; }
boolean onIdleTimeout(Throwable timeout) { if (_delayedForContent) { _delayedForContent = false; getRequest().getHttpInput().onIdleTimeout(timeout); execute(this); return false; } return true; }
public boolean onRequestComplete() { if (LOG.isDebugEnabled()) LOG.debug("{} onRequestComplete", this); boolean result = _request.getHttpInput().eof(); notifyRequestEnd(_request); return result; }
public boolean onContent(HttpInput.Content content) { if (LOG.isDebugEnabled()) LOG.debug("{} onContent {}", this, content); notifyRequestContent(_request, content.getByteBuffer()); return _request.getHttpInput().addContent(content); }
public Runnable onFailure(Throwable failure, Callback callback) { getHttpTransport().onStreamFailure(failure); boolean handle = getRequest().getHttpInput().failed(failure); consumeInput(); return new FailureTask(failure, callback, handle); }