Source Code Cross Referenced for ClusterRuleSet.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » catalina » ha » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.catalina.ha 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         * 
009:         *      http://www.apache.org/licenses/LICENSE-2.0
010:         * 
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package org.apache.catalina.ha;
019:
020:        import org.apache.tomcat.util.digester.Digester;
021:        import org.apache.tomcat.util.digester.RuleSetBase;
022:
023:        /**
024:         * <p><strong>RuleSet</strong> for processing the contents of a
025:         * Cluster definition element.  </p>
026:         *
027:         * @author Filip Hanik
028:         * @author Peter Rossbach
029:         * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
030:         */
031:
032:        public class ClusterRuleSet extends RuleSetBase {
033:
034:            // ----------------------------------------------------- Instance Variables
035:
036:            /**
037:             * The matching pattern prefix to use for recognizing our elements.
038:             */
039:            protected String prefix = null;
040:
041:            // ------------------------------------------------------------ Constructor
042:
043:            /**
044:             * Construct an instance of this <code>RuleSet</code> with the default
045:             * matching pattern prefix.
046:             */
047:            public ClusterRuleSet() {
048:
049:                this ("");
050:
051:            }
052:
053:            /**
054:             * Construct an instance of this <code>RuleSet</code> with the specified
055:             * matching pattern prefix.
056:             *
057:             * @param prefix Prefix for matching pattern rules (including the
058:             *  trailing slash character)
059:             */
060:            public ClusterRuleSet(String prefix) {
061:                super ();
062:                this .namespaceURI = null;
063:                this .prefix = prefix;
064:            }
065:
066:            // --------------------------------------------------------- Public Methods
067:
068:            /**
069:             * <p>Add the set of Rule instances defined in this RuleSet to the
070:             * specified <code>Digester</code> instance, associating them with
071:             * our namespace URI (if any).  This method should only be called
072:             * by a Digester instance.</p>
073:             *
074:             * @param digester Digester instance to which the new Rule instances
075:             *  should be added.
076:             */
077:            public void addRuleInstances(Digester digester) {
078:                //Cluster configuration start
079:                digester.addObjectCreate(prefix + "Manager", null, // MUST be specified in the element
080:                        "className");
081:                digester.addSetProperties(prefix + "Manager");
082:                digester.addSetNext(prefix + "Manager", "setManagerTemplate",
083:                        "org.apache.catalina.ha.ClusterManager");
084:
085:                digester.addObjectCreate(prefix + "Channel", null, // MUST be specified in the element
086:                        "className");
087:                digester.addSetProperties(prefix + "Channel");
088:                digester.addSetNext(prefix + "Channel", "setChannel",
089:                        "org.apache.catalina.tribes.Channel");
090:
091:                String channelPrefix = prefix + "Channel/";
092:                { //channel properties
093:                    digester.addObjectCreate(channelPrefix + "Membership",
094:                            null, // MUST be specified in the element
095:                            "className");
096:                    digester.addSetProperties(channelPrefix + "Membership");
097:                    digester.addSetNext(channelPrefix + "Membership",
098:                            "setMembershipService",
099:                            "org.apache.catalina.tribes.MembershipService");
100:
101:                    digester.addObjectCreate(channelPrefix + "Sender", null, // MUST be specified in the element
102:                            "className");
103:                    digester.addSetProperties(channelPrefix + "Sender");
104:                    digester.addSetNext(channelPrefix + "Sender",
105:                            "setChannelSender",
106:                            "org.apache.catalina.tribes.ChannelSender");
107:
108:                    digester.addObjectCreate(
109:                            channelPrefix + "Sender/Transport", null, // MUST be specified in the element
110:                            "className");
111:                    digester.addSetProperties(channelPrefix
112:                            + "Sender/Transport");
113:                    digester
114:                            .addSetNext(channelPrefix + "Sender/Transport",
115:                                    "setTransport",
116:                                    "org.apache.catalina.tribes.transport.MultiPointSender");
117:
118:                    digester.addObjectCreate(channelPrefix + "Receiver", null, // MUST be specified in the element
119:                            "className");
120:                    digester.addSetProperties(channelPrefix + "Receiver");
121:                    digester.addSetNext(channelPrefix + "Receiver",
122:                            "setChannelReceiver",
123:                            "org.apache.catalina.tribes.ChannelReceiver");
124:
125:                    digester.addObjectCreate(channelPrefix + "Interceptor",
126:                            null, // MUST be specified in the element
127:                            "className");
128:                    digester.addSetProperties(channelPrefix + "Interceptor");
129:                    digester.addSetNext(channelPrefix + "Interceptor",
130:                            "addInterceptor",
131:                            "org.apache.catalina.tribes.ChannelInterceptor");
132:
133:                    digester.addObjectCreate(channelPrefix
134:                            + "Interceptor/Member", null, // MUST be specified in the element
135:                            "className");
136:                    digester.addSetProperties(channelPrefix
137:                            + "Interceptor/Member");
138:                    digester.addSetNext(channelPrefix + "Interceptor/Member",
139:                            "addStaticMember",
140:                            "org.apache.catalina.tribes.Member");
141:                }
142:
143:                digester.addObjectCreate(prefix + "Valve", null, // MUST be specified in the element
144:                        "className");
145:                digester.addSetProperties(prefix + "Valve");
146:                digester.addSetNext(prefix + "Valve", "addValve",
147:                        "org.apache.catalina.Valve");
148:
149:                digester.addObjectCreate(prefix + "Deployer", null, // MUST be specified in the element
150:                        "className");
151:                digester.addSetProperties(prefix + "Deployer");
152:                digester.addSetNext(prefix + "Deployer", "setClusterDeployer",
153:                        "org.apache.catalina.ha.ClusterDeployer");
154:
155:                digester.addObjectCreate(prefix + "Listener", null, // MUST be specified in the element
156:                        "className");
157:                digester.addSetProperties(prefix + "Listener");
158:                digester.addSetNext(prefix + "Listener",
159:                        "addLifecycleListener",
160:                        "org.apache.catalina.LifecycleListener");
161:
162:                digester.addObjectCreate(prefix + "ClusterListener", null, // MUST be specified in the element
163:                        "className");
164:                digester.addSetProperties(prefix + "ClusterListener");
165:                digester.addSetNext(prefix + "ClusterListener",
166:                        "addClusterListener",
167:                        "org.apache.catalina.ha.ClusterListener");
168:                //Cluster configuration end
169:            }
170:
171:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.