01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.geoserver.ows;
06:
07: import javax.servlet.http.HttpServletResponse;
08:
09: /**
10: * Factory used to create an {@link ServiceStrategy} for a request.
11: * <p>
12: * An {@link ServiceStrategy} is used to provide different modes of writing
13: * output.
14: * </p>
15: * <p>
16: * Examples include a "safe mode", in which the entire response is buffered
17: * before being output, as to ensure no errors occur during the writing
18: * of a response. Another example may include a "speed mode" where data is
19: * written directly to the output with no buffering.
20: * </p>
21: * @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
22: *
23: */
24: public interface OutputStrategyFactory {
25: /**
26: * Creates an output strategy for a response.
27: *
28: * @param response The response which contains the live output stream in
29: * which to write data to.
30: *
31: * @return An output strategy to write output to.
32: */
33: ServiceStrategy createOutputStrategy(HttpServletResponse response);
34: }
|