@Override public void onAfterService(final Request request) { // same as request.getContext().flush(this), but less garbage request.getContext().notifyDownstream(event); } }
@Override public void onAfterService(final Request request) { // same as request.getContext().flush(this), but less garbage request.getContext().notifyDownstream(event); } }
@Override public void onAfterService(final Request request) { // same as request.getContext().flush(this), but less garbage request.getContext().notifyDownstream(event); } }
@Override public void onAfterService(final Request request) { // same as request.getContext().flush(this), but less garbage request.getContext().notifyDownstream(event); } }
@Override public void onAfterService(final Request request) { // same as request.getContext().flush(this), but less garbage request.getContext().notifyDownstream(event); } }
@Override public void onAfterService(final Request request) { // same as request.getContext().flush(this), but less garbage request.getContext().notifyDownstream(event); } }
private boolean establishConnectTunnel(final ProxyServer proxy, final HttpTransactionContext httpCtx, final Uri uri, final FilterChainContext ctx) throws IOException { final Connection connection = ctx.getConnection(); final HttpRequestPacket requestPacket = HttpRequestPacket.builder() .protocol(Protocol.HTTP_1_0) .method(Method.CONNECT) .uri(AsyncHttpProviderUtils.getAuthority(uri)) .build(); setupKeepAlive(requestPacket, connection); httpCtx.establishingTunnel = true; final Request request = httpCtx.getAhcRequest(); addHostHeaderIfNeeded(request, uri, requestPacket); addServiceHeaders(requestPacket); final Realm realm = getRealm(request); addAuthorizationHeader(request, requestPacket, realm, uri, proxy, false); addProxyHeaders(request, requestPacket, realm, proxy, false, true); // turn off SSL, because CONNECT will be sent in plain mode ctx.notifyDownstream(new SSLSwitchingEvent(connection, false)); return sendRequest(httpCtx, ctx, requestPacket, null); }
private void doComplete() { ctx.notifyDownstream(HttpServerFilter.RESPONSE_COMPLETE_EVENT); responseStatusCallback.responseSendSuccessfully(); resume(); }
ctx.notifyDownstream(new SSLSwitchingEvent(connection, secure, uri.getHost(), uri.getPort()));
private void doComplete() { close(); responseStatusCallback.responseSendSuccessfully(); ctx.notifyDownstream(RESPONSE_COMPLETE_EVENT); resume(); }
private void doComplete() { close(); responseStatusCallback.responseSendSuccessfully(); ctx.notifyDownstream(RESPONSE_COMPLETE_EVENT); resume(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { // if downstream event - pass it to the puFilter if (isDownstream(ctx)) { final FilterChainContext suspendedParentContext = puFilter.suspendedContextAttribute.get(ctx); assert suspendedParentContext != null; suspendedParentContext.notifyDownstream(event); } return ctx.getInvokeAction(); }