Examples of HTTPChannel


Examples of org.eclipse.jetty.server.HttpChannel

        {
            if (etag.contains(ETAG_GZIP))
                request.setAttribute(ETAG,etag.replace(ETAG_GZIP,""));
        }

        HttpChannel channel = HttpChannel.getCurrentHttpChannel();
        HttpOutput out = channel.getResponse().getHttpOutput();  
        HttpOutput.Interceptor interceptor = out.getInterceptor();
        if (!(interceptor instanceof GzipHttpOutputInterceptor))
            out.setInterceptor(new GzipHttpOutputInterceptor(this,_vary,channel,interceptor));

        _handler.handle(target,baseRequest, request, response);
View Full Code Here

Examples of org.eclipse.jetty.server.HttpChannel

   
  
    @Override
    public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
    {
        final HttpChannel channel = baseRequest.getHttpChannel();
        final long idle_timeout=baseRequest.getHttpChannel().getIdleTimeout();
        channel.setIdleTimeout(_idleTimeoutMs);
       
        try
        {
            super.handle(target,baseRequest,request,response);
        }
        finally
        {
            if (_applyToAsync && request.isAsyncStarted())
            {
                request.getAsyncContext().addListener(new AsyncListener()
                {
                    @Override
                    public void onTimeout(AsyncEvent event) throws IOException
                    {                           
                    }

                    @Override
                    public void onStartAsync(AsyncEvent event) throws IOException
                    {
                    }

                    @Override
                    public void onError(AsyncEvent event) throws IOException
                    {
                        channel.setIdleTimeout(idle_timeout);
                    }

                    @Override
                    public void onComplete(AsyncEvent event) throws IOException
                    {
                        channel.setIdleTimeout(idle_timeout);
                    }
                });
            }
            else
                channel.setIdleTimeout(idle_timeout);
        }
    }
View Full Code Here

Examples of org.eclipse.jetty.server.HttpChannel

     */
    @Override
    public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
    {
        // Get the real remote IP (not the one set by the forwarded headers (which may be forged))
        HttpChannel channel = baseRequest.getHttpChannel();
        if (channel!=null)
        {
            EndPoint endp=channel.getEndPoint();
            if (endp!=null)
            {
                InetSocketAddress address = endp.getRemoteAddress();
                if (address!=null && !isAddrUriAllowed(address.getHostString(),baseRequest.getPathInfo()))
                {
View Full Code Here

Examples of org.eclipse.jetty.server.HttpChannel

                            {
                                ((ObjectCallback)callback).setObject(credentials);
                            }
                            else if (callback instanceof RequestParameterCallback)
                            {
                                HttpChannel channel = HttpChannel.getCurrentHttpChannel();

                                if (channel == null)
                                    return;
                                Request request = channel.getRequest();

                                if (request != null)
                                {
                                    RequestParameterCallback rpc = (RequestParameterCallback)callback;
                                    rpc.setParameterValues(Arrays.asList(request.getParameterValues(rpc.getParameterName())));
View Full Code Here

Examples of org.eclipse.jetty.server.HttpChannel

                            {
                                ((ObjectCallback)callback).setObject(credentials);
                            }
                            else if (callback instanceof RequestParameterCallback)
                            {
                              HttpChannel channel = HttpChannel.getCurrentHttpChannel();

                                if (channel == null)
                                    return;
                                Request request = channel.getRequest();

                                if (request != null)
                                {
                                    RequestParameterCallback rpc = (RequestParameterCallback)callback;
                                    rpc.setParameterValues(Arrays.asList(request.getParameterValues(rpc.getParameterName())));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.