Source Code Cross Referenced for ComponentMessageHolder.java in  » ESB » open-esb » com » sun » jbi » common » management » 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 » ESB » open esb » com.sun.jbi.common.management 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * BEGIN_HEADER - DO NOT EDIT
003:         *
004:         * The contents of this file are subject to the terms
005:         * of the Common Development and Distribution License
006:         * (the "License").  You may not use this file except
007:         * in compliance with the License.
008:         *
009:         * You can obtain a copy of the license at
010:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011:         * See the License for the specific language governing
012:         * permissions and limitations under the License.
013:         *
014:         * When distributing Covered Code, include this CDDL
015:         * HEADER in each file and include the License file at
016:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017:         * If applicable add the following below this CDDL HEADER,
018:         * with the fields enclosed by brackets "[]" replaced with
019:         * your own identifying information: Portions Copyright
020:         * [year] [name of copyright owner]
021:         */
022:
023:        /*
024:         * @(#)ComponentMessageHolder.java
025:         * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026:         *
027:         * END_HEADER - DO NOT EDIT
028:         */
029:        package com.sun.jbi.common.management;
030:
031:        import java.util.HashMap;
032:
033:        /**
034:         * This provides necessary methods for the components to  pass the task result data to
035:         * ManagemntMessageBuilder. ManagementMessageBuilder constructs an XML document based on
036:         * this.
037:         *
038:         * @author Sun Microsystems, Inc.
039:         */
040:        public class ComponentMessageHolder {
041:            /**
042:             * Type of message to build. Currently it can either be 'Status' or 'Exception'
043:             */
044:            private String mMsgTypeToBuild = null;
045:
046:            /**
047:             * Cache for Localized Tokens
048:             */
049:            private HashMap mLocTokenCache = new HashMap();
050:
051:            /**
052:             * Cache for Localized Tokens
053:             */
054:            private HashMap mLocMessageCache = new HashMap();
055:
056:            /**
057:             * Cache for Localized Tokens
058:             */
059:            private HashMap mLocParamCache = new HashMap();
060:
061:            /**
062:             * Exception Object
063:             */
064:            private Throwable mExceptionObject = null;
065:
066:            /**
067:             * task name
068:             */
069:            private String mTaskName = null;
070:
071:            /**
072:             * task result
073:             */
074:            private String mTaskResult = null;
075:
076:            /**
077:             * status message type
078:             */
079:            private String mStatusMsgType = null;
080:
081:            /**
082:             * exception message type
083:             */
084:            private String mExceptionMsgType = null;
085:
086:            /**
087:             * component name
088:             */
089:            private String mComponentName = null;
090:
091:            /**
092:             * Creates a new instance of MessageContentHolder with a message type.
093:             *
094:             * @param msgType String describing the message type to build.
095:             */
096:            public ComponentMessageHolder(String msgType) {
097:                mMsgTypeToBuild = msgType;
098:            }
099:
100:            /**
101:             * Set the name of the task executed by component.
102:             *
103:             * @param taskName - task executed by component.
104:             */
105:            public void setTaskName(String taskName) {
106:                mTaskName = taskName;
107:            }
108:
109:            /**
110:             * Set the name of the component that executed the task.
111:             *
112:             * @param name - Name of the component.
113:             */
114:            public void setComponentName(String name) {
115:                mComponentName = name;
116:            }
117:
118:            /**
119:             * Set the result of the task executed by component.
120:             *
121:             * @param taskResult - result of task executed by component.
122:             */
123:            public void setTaskResult(String taskResult) {
124:                mTaskResult = taskResult;
125:            }
126:
127:            /**
128:             * Set the exception object.
129:             *
130:             * @param exObj - exception object.
131:             */
132:            public void setExceptionObject(Throwable exObj) {
133:                mExceptionObject = exObj;
134:            }
135:
136:            /**
137:             * Set the message type being returned by the component.
138:             *
139:             * @param statMsgType - type of success message that is  being returned by the
140:             *        component.
141:             */
142:            public void setStatusMessageType(String statMsgType) {
143:                mStatusMsgType = statMsgType;
144:            }
145:
146:            /**
147:             * Set the exception message type being returned by the component.
148:             *
149:             * @param exMsgType - type of exception message that is  being returned by the
150:             *        component.
151:             */
152:            public void setExceptionMessageType(String exMsgType) {
153:                mExceptionMsgType = exMsgType;
154:            }
155:
156:            /**
157:             * Set the message token for the exception being thrown by the component.
158:             *
159:             * @param nestingLevel - nesting level of the exception
160:             * @param locToken - message token.
161:             */
162:            public void setLocToken(int nestingLevel, String locToken) {
163:                mLocTokenCache.put(String.valueOf(nestingLevel), locToken);
164:            }
165:
166:            /**
167:             * Set the message for the exception being thrown by the component.
168:             *
169:             * @param nestingLevel - nesting level of the exception.
170:             * @param locMessage - exception message.
171:             */
172:            public void setLocMessage(int nestingLevel, String locMessage) {
173:                mLocMessageCache.put(String.valueOf(nestingLevel), locMessage);
174:            }
175:
176:            /**
177:             * Set the message parameters for the exception being thrown by the component.
178:             *
179:             * @param nestingLevel - nesting level of the exception.
180:             * @param locParam - exception message parameters.
181:             */
182:            public void setLocParam(int nestingLevel, String[] locParam) {
183:                mLocParamCache.put(String.valueOf(nestingLevel), locParam);
184:            }
185:
186:            /**
187:             * Returns the message token.
188:             *
189:             * @param nestingLevel nesting level of the exception.
190:             *
191:             * @return message token at the given nesting level.
192:             */
193:            public String getLocToken(int nestingLevel) {
194:                return (String) mLocTokenCache
195:                        .get(String.valueOf(nestingLevel));
196:            }
197:
198:            /**
199:             * Returns the exception message.
200:             *
201:             * @param nestingLevel nesting level of the exception
202:             *
203:             * @return exception message at the given nesting level
204:             */
205:            public String getLocMessage(int nestingLevel) {
206:                return (String) mLocMessageCache.get(String
207:                        .valueOf(nestingLevel));
208:            }
209:
210:            /**
211:             * Returns the exception message parameters.
212:             *
213:             * @param nestingLevel nesting level of the exception.
214:             *
215:             * @return exception message parameters at the given nesting level.
216:             */
217:            public String[] getLocParam(int nestingLevel) {
218:                return (String[]) mLocParamCache.get(String
219:                        .valueOf(nestingLevel));
220:            }
221:
222:            /**
223:             * Get the exception object being thrown by this component.
224:             *
225:             * @return Exception Object.
226:             */
227:            public Throwable getExceptionObject() {
228:                return mExceptionObject;
229:            }
230:
231:            /**
232:             * Get the name of the task executed by this component.
233:             *
234:             * @return Task name.
235:             */
236:            public String getTaskName() {
237:                return mTaskName;
238:            }
239:
240:            /**
241:             * Get the result of the task executed by this component.
242:             *
243:             * @return Task Result.
244:             */
245:            public String getTaskResult() {
246:                return mTaskResult;
247:            }
248:
249:            /**
250:             * Get the type(status, exception) of message to be built for this component.
251:             *
252:             * @return Task Result.
253:             */
254:            public String getComponentMessageType() {
255:                return mMsgTypeToBuild;
256:            }
257:
258:            /**
259:             * Get the status message type being returned by the component.
260:             *
261:             * @return Status message type.
262:             */
263:            public String getStatusMessageType() {
264:                return mStatusMsgType;
265:            }
266:
267:            /**
268:             * Get the exception message type being returned by the component.
269:             *
270:             * @return Status message type.
271:             */
272:            public String getExceptionMessageType() {
273:                return mExceptionMsgType;
274:            }
275:
276:            /**
277:             * Return the name of the component.
278:             *
279:             * @return component name.
280:             */
281:            public String getComponentName() {
282:                return mComponentName;
283:            }
284:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.