01: /*
02: * $Id$
03: * $Revision$
04: * $Date$
05: *
06: * ==============================================================================
07: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
08: * use this file except in compliance with the License. You may obtain a copy of
09: * the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16: * License for the specific language governing permissions and limitations under
17: * the License.
18: */
19: package wicket;
20:
21: import wicket.util.string.AppendingStringBuffer;
22:
23: /**
24: * A response filter can be added to the
25: * {@link wicket.settings.IRequestCycleSettings#addResponseFilter(IResponseFilter)} object
26: * The will be called from the Buffered Response objects right before they would send it to the
27: * real responses. You have to use the
28: * {@link wicket.settings.IRequestCycleSettings#setBufferResponse(boolean)}(to true which is the default)
29: * for this filtering to work.
30: *
31: * @author jcompagner
32: *
33: * @see wicket.settings.IRequestCycleSettings#addResponseFilter(IResponseFilter)
34: */
35: public interface IResponseFilter {
36: /**
37: * Filters the response buffer and returns the filtered response that can be
38: * used in the next filter or returned to the real output itself.
39: *
40: * A filter may alter the response buffer and return the response buffer
41: * itself.
42: *
43: * @param responseBuffer
44: * The response buffer to be filtered
45: * @return The changed buffer or the response buffer itself (changed or not)
46: */
47: AppendingStringBuffer filter(AppendingStringBuffer responseBuffer);
48: }
|