All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.barchart.http.request.RequestHandlerFactory Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
/**
 * Copyright (C) 2011-2013 Barchart, Inc. 
 *
 * All rights reserved. Licensed under the OSI BSD License.
 *
 * http://www.opensource.org/licenses/bsd-license.php
 */
package com.barchart.http.request;

/**
 * Factory for creating RequestHandler instances, which allows more control over
 * request handler lifecycle. Using a RequestHandlerFactory in conjunction with
 * RequestHandler.onComplete() can allow for construction of a cached handler
 * pool while still allowing request-specific state to be stored in the handler.
 */
public interface RequestHandlerFactory {

	/**
	 * Create a new request handler. Subclasses can use this method in
	 * conjunction with onComplete() to implement limited-size request handler
	 * pools to avoid excessive object creation and garbage collection.
	 */
	public RequestHandler newHandler(ServerRequest request);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy