01: /*
02: * $Id: DefaultResponseStrategy.java 459644 2006-03-06 01:08:33Z jcompagner $
03: * $Revision: 459644 $
04: * $Date: 2006-03-06 02:08:33 +0100 (Mon, 06 Mar 2006) $
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.request.compound;
20:
21: import wicket.Application;
22: import wicket.IRequestTarget;
23: import wicket.RequestCycle;
24:
25: /**
26: * Default implementation of response strategy that just calls
27: * {@link wicket.IRequestTarget#respond(RequestCycle)}.
28: *
29: * @author Eelco Hillenius
30: */
31: public final class DefaultResponseStrategy implements IResponseStrategy {
32: /**
33: * Construct.
34: */
35: public DefaultResponseStrategy() {
36: }
37:
38: /**
39: * @see wicket.request.compound.IResponseStrategy#respond(wicket.RequestCycle)
40: */
41: public void respond(RequestCycle requestCycle) {
42: IRequestTarget requestTarget = requestCycle.getRequestTarget();
43: if (requestTarget != null) {
44: Application.get().logResponseTarget(requestTarget);
45: requestTarget.respond(requestCycle);
46: }
47: }
48: }
|