MCPcopy Index your code
hub / github.com/apache/tomcat / ClusterRuleSet

Class ClusterRuleSet

java/org/apache/catalina/ha/ClusterRuleSet.java:25–172  ·  view source on GitHub ↗

RuleSet for processing the contents of a Cluster definition element.

Source from the content-addressed store, hash-verified

23 * <strong>RuleSet</strong> for processing the contents of a Cluster definition element.
24 */
25public class ClusterRuleSet implements RuleSet {
26
27
28 // ----------------------------------------------------- Instance Variables
29
30
31 /**
32 * The matching pattern prefix to use for recognizing our elements.
33 */
34 protected final String prefix;
35
36
37 // ------------------------------------------------------------ Constructor
38
39
40 /**
41 * Construct an instance of this <code>RuleSet</code> with the default matching pattern prefix.
42 */
43 public ClusterRuleSet() {
44 this("");
45 }
46
47
48 /**
49 * Construct an instance of this <code>RuleSet</code> with the specified matching pattern prefix.
50 *
51 * @param prefix Prefix for matching pattern rules (including the trailing slash character)
52 */
53 public ClusterRuleSet(String prefix) {
54 this.prefix = prefix;
55 }
56
57
58 // --------------------------------------------------------- Public Methods
59
60
61 @Override
62 public void addRuleInstances(Digester digester) {
63 // Cluster configuration start
64 digester.addObjectCreate(prefix + "Manager", null, // MUST be specified in the element
65 "className");
66 digester.addSetProperties(prefix + "Manager");
67 digester.addSetNext(prefix + "Manager", "setManagerTemplate", "org.apache.catalina.ha.ClusterManager");
68 digester.addObjectCreate(prefix + "Manager/SessionIdGenerator",
69 "org.apache.catalina.util.StandardSessionIdGenerator", "className");
70 digester.addSetProperties(prefix + "Manager/SessionIdGenerator");
71 digester.addSetNext(prefix + "Manager/SessionIdGenerator", "setSessionIdGenerator",
72 "org.apache.catalina.SessionIdGenerator");
73
74 digester.addObjectCreate(prefix + "Channel", null, // MUST be specified in the element
75 "className");
76 digester.addSetProperties(prefix + "Channel");
77 digester.addSetNext(prefix + "Channel", "setChannel", "org.apache.catalina.tribes.Channel");
78
79
80 String channelPrefix = prefix + "Channel/";
81
82 // channel properties

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected