Code example for DefaultHttpResponseFactory

0
                new ResponseServer(),
                new ResponseContent(),
                new ResponseConnControl()
        }); 
         
        BufferingHttpServiceHandler handler = new BufferingHttpServiceHandler(
                httpproc,
                new DefaultHttpResponseFactory(),
                new DefaultConnectionReuseStrategy(),
                params);
 
        // Set up request handlers 
        HttpRequestHandlerRegistry reqistry = new HttpRequestHandlerRegistry();
        reqistry.register("*", new HttpFileHandler(args[0]));
 
        handler.setHandlerResolver(reqistry);
 
        // Provide an event logger 
        handler.setEventListener(new EventLogger());
 
        IOEventDispatch ioEventDispatch = new DefaultServerIOEventDispatch(handler, params);