Package com.sun.grizzly.http

Examples of com.sun.grizzly.http.ProcessorTask


    private static final String ATTACHMENT_DISPOSITION = "attachment;";
    private static final String GRAPHML_SUFFIX = ".gml";

    public boolean doFilter( AsyncExecutor asyncExecutor )
    {
        ProcessorTask task = (ProcessorTask) asyncExecutor.getProcessorTask();

        Response response = task.getRequest().getResponse();

        if ( task.getRequest().requestURI().toString().endsWith( GRAPHML_SUFFIX ) )
        {
            response.addHeader( CONTENT_DISPOSITION, ATTACHMENT_DISPOSITION );
        }

        // Pass execution onwards
        task.invokeAdapter();

        return true;
    }
View Full Code Here

TOP

Related Classes of com.sun.grizzly.http.ProcessorTask

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.