Package org.glassfish.grizzly.http

Examples of org.glassfish.grizzly.http.HttpContext


       
        return flush(ctx);
    }
   
    private NextAction flush(final FilterChainContext ctx) {
        final HttpContext httpContext = HttpContext.get(ctx);
        assert httpContext != null;
        final OutputSink output = httpContext.getOutputSink();

        if (output.canWrite()) {  // if connection write queue is not overloaded
            return ctx.getStopAction();
        } else { // if connection write queue is overloaded
View Full Code Here


            this.response = response;
            this.fis = fis;
            this.fc = fc;
            this.remaining = size;
           
            final HttpContext httpContext = response.getProcessingState().getHttpContext();
            assert httpContext != null;
            output = httpContext.getOutputSink();
        }
View Full Code Here

        if (HttpPacket.isHttp(message)) {

            // Otherwise cast message to a HttpContent
            final HttpContent httpContent = (HttpContent) message;
            final HttpContext context = httpContent.getHttpHeader()
                    .getProcessingState().getHttpContext();
            Request handlerRequest = httpRequestInProgress.get(context);

            if (handlerRequest == null) {
                // It's a new HTTP request
View Full Code Here

     * @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();
View Full Code Here

            final Connection connection,
            final Request request,
            final Response response)
            throws IOException {

        final HttpContext context = request.getRequest()
                .getProcessingState().getHttpContext();
       
        httpRequestInProgress.remove(context);
        response.finish();
        request.onAfterService();
View Full Code Here

        if (HttpPacket.isHttp(message)) {

            // Otherwise cast message to a HttpContent
            final HttpContent httpContent = (HttpContent) message;
            final HttpContext context = HttpContext.get(ctx);
            Request handlerRequest = httpRequestInProgress.get(context);

            if (handlerRequest == null) {
                // It's a new HTTP request
                final HttpRequestPacket request = (HttpRequestPacket) httpContent.getHttpHeader();
View Full Code Here

     * @param ctx event processing {@link FilterChainContext}
     * @param error error, which occurred during <tt>FilterChain</tt> execution
     */
    @Override
    public void exceptionOccurred(FilterChainContext ctx, Throwable error) {
        final HttpContext context = HttpContext.get(ctx);
        final Request request = httpRequestInProgress.get(context);

        if (request != null) {
            final ReadHandler handler = request.getInputBuffer().getReadHandler();
            if (handler != null) {
View Full Code Here

            final Connection connection,
            final Request request,
            final Response response)
            throws IOException {

        final HttpContext context = HttpContext.get(ctx);
        httpRequestInProgress.remove(context);
        response.finish();
        request.onAfterService();
       
        HttpServerProbeNotifier.notifyRequestComplete(this, connection, response);
View Full Code Here

       
        return flush(ctx);
    }
   
    private NextAction flush(final FilterChainContext ctx) {
        final HttpContext httpContext = HttpContext.get(ctx);
        assert httpContext != null;
        final OutputSink output = httpContext.getOutputSink();

        if (output.canWrite()) {  // if connection write queue is not overloaded
            return ctx.getStopAction();
        } else { // if connection write queue is overloaded
View Full Code Here

            this.response = response;
            this.fis = fis;
            this.fc = fc;
            this.remaining = size;
           
            final HttpContext httpContext = HttpContext.get(ctx);
            assert httpContext != null;
            output = httpContext.getOutputSink();
        }
View Full Code Here

TOP

Related Classes of org.glassfish.grizzly.http.HttpContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.