01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.wicket;
18:
19: /**
20: * <p>
21: * A request target is the base entity that is the subject of a request.
22: * Different types of request have different request targets. For instance a
23: * request for a bookmarkable page differs from a request for a link on a
24: * previously rendered page, which in turn differs from a request for a shared
25: * resource.
26: * </p>
27: * <p>
28: * It is very important (for mounting) that implementations implement
29: * {@link java.lang.Object#equals(java.lang.Object)} and
30: * {@link java.lang.Object#hashCode()} in a consistent way.
31: * </p>
32: * Typically, implementations of IRequestTarget are not meant to be used more
33: * than once.
34: *
35: * @author Eelco Hillenius
36: */
37: public interface IRequestTarget {
38: /**
39: * Generates a response.
40: *
41: * @param requestCycle
42: * the current request cycle
43: */
44: void respond(RequestCycle requestCycle);
45:
46: /**
47: * This method is alled on the end of a request cycle to indicate that
48: * processing is done and that cleaning up of the subject(s) of this target
49: * may be done.
50: *
51: * @param requestCycle
52: * the current request cycle
53: */
54: void detach(RequestCycle requestCycle);
55: }
|