2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shale.remoting;
19
20 /***
21 * <p>Typesafe enumeration of the legal values that may be specified for the
22 * <code>mechanism</code> property of a {@link Mapping}. Note that these values
23 * are advisory only -- the framework has no concept of what technique is
24 * actually employed to translate the incomfing view identifier into content
25 * to be supplied as a response.</p>
26 */
27 public final class Mechanism {
28
29
30
31
32
33 /***
34 * <p>Private constructor to disable creation of new instances.</p>
35 *
36 * @param description Description of this mechanism
37 */
38 private Mechanism(String description) {
39
40 this.description = description;
41
42 }
43
44
45
46
47
48 /***
49 * <p>The description of this mechanism.</p>
50 */
51 private String description = null;
52
53
54
55
56
57 /***
58 * <p>Return a string representation of this mechansim.</p>
59 */
60 public String toString() {
61
62 return this.description;
63
64 }
65
66
67
68
69
70
71
72 /***
73 * <p>{@link Mechanism} indicating that the processor should serve a static
74 * resource from the classpath of this web application.</p>
75 */
76 public static final Mechanism CLASS_RESOURCE = new Mechanism("CLASS_RESOURCE");
77
78
79 /***
80 * <p>{@link Mechanism} indicating that the processor should serve a static
81 * resource from the web application archive of this web application.</p>
82 */
83 public static final Mechanism WEBAPP_RESOURCE = new Mechanism("WEBAPP_RESOURCE");
84
85
86 /***
87 * <p>{@link Mechanism} indicating that the processor should dynamically
88 * calculate the content type, and contents, of the response to be
89 * created.</p>
90 */
91 public static final Mechanism DYNAMIC_RESOURCE = new Mechanism("DYNAMIC_RESOURCE");
92
93
94 /***
95 * <p>{@link Mechanism} indicating that an unspecified mechanism will be
96 * used to provide the content for the response.</p>
97 */
98 public static final Mechanism OTHER_RESOURCE = new Mechanism("OTHER_RESOURCE");
99
100
101 }