Package org.glassfish.grizzly.filterchain

Examples of org.glassfish.grizzly.filterchain.NextAction


        if (isBroken) {
            // if content is broken - we're not able to distinguish
            // the end of the message - so stop processing any input data on
            // this connection (connection is being closed by
            // {@link org.glassfish.grizzly.http.HttpServerFilter#handleEvent(...)}
            final NextAction suspendNextAction = ctx.getSuspendAction();
            ctx.completeAndRecycle();
            return suspendNextAction;
        }
       
        return ctx.getStopAction();
View Full Code Here


                    }
                   
                    connection.setProcessor(connectionFilterChain);

                    if (hasRemaining) {
                        NextAction suspendAction = ctx.getSuspendAction();
                        ctx.setMessage(buffer);
                        ctx.suspend();
                        final FilterChainContext newContext =
                                obtainProtocolChainContext(ctx, connectionFilterChain);
                        ProcessorExecutor.execute(newContext.getInternalContext());
View Full Code Here

                onHttpHeaderError(httpHeader, ctx, e);

                // make the connection deaf to any following input
                // onHttpError call will take care of error processing
                // and closing the connection
                final NextAction suspendAction = ctx.getSuspendAction();
                ctx.completeAndRecycle();
                return suspendAction;
            }
        }
View Full Code Here

    protected static NextAction gracefullyCloseConnection(
            final FilterChainContext ctx) {
        flushAndClose(ctx);
       
        // we skip the processing and let connection to be closed
        final NextAction suspendAction = ctx.getSuspendAction();
        ctx.completeAndRecycle();
        return suspendAction;
    }
View Full Code Here

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

            // prepare context for suspend
            final NextAction suspendAction = ctx.getSuspendAction();
            ctx.suspend();

            // notify when connection becomes writable, so we can resume it
            output.notifyCanWrite(new WriteHandler() {
                @Override
View Full Code Here

                    targetInitializer = targetInitializerLocal;
                }
            }
        }

        final NextAction nextAction = ctx.getSuspendAction();
        ctx.completeAndRecycle();

        // Deregister channel
        final SelectorRunner runner = nioConnection.getSelectorRunner();
        final SelectorHandler selectorHandler =
View Full Code Here

                    targetInitializer = targetInitializerLocal;
                }
            }
        }

        final NextAction nextAction = ctx.getSuspendAction();
        ctx.completeAndRecycle();

        // Deregister channel
        final SelectorRunner runner = nioConnection.getSelectorRunner();
        final SelectorHandler selectorHandler =
View Full Code Here

TOP

Related Classes of org.glassfish.grizzly.filterchain.NextAction

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.