Source Code Cross Referenced for ComponentMessageHolder.java in  » ESB » open-esb » com » sun » jbi » 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.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.management;
030:
031:        import java.util.HashMap;
032:
033:        /**
034:         * This provides necessary methods for the components to 
035:         * pass the task result data to ManagemntMessageBuilder.
036:         * ManagementMessageBuilder constructs an XML document
037:         * based on this.
038:         *
039:         * @author Sun Microsystems, Inc.
040:         */
041:
042:        public class ComponentMessageHolder {
043:            /** 
044:             * Type of message to build. Currently
045:             * it can either be 'Status' or 'Exception'
046:             */
047:            private String mMsgTypeToBuild = null;
048:
049:            /** 
050:             * Cache for Localized Tokens
051:             */
052:            private HashMap mLocTokenCache = new HashMap();
053:
054:            /** 
055:             * Cache for Localized Tokens
056:             */
057:            private HashMap mLocMessageCache = new HashMap();
058:
059:            /** 
060:             * Cache for Localized Tokens 
061:             */
062:            private HashMap mLocParamCache = new HashMap();
063:
064:            /** 
065:             * Exception Object
066:             */
067:            private Throwable mExceptionObject = null;
068:
069:            /** 
070:             * task name
071:             */
072:            private String mTaskName = null;
073:
074:            /** 
075:             * task result 
076:             */
077:            private String mTaskResult = null;
078:
079:            /** 
080:             * status message type 
081:             */
082:            private String mStatusMsgType = null;
083:
084:            /** 
085:             * exception message type
086:             */
087:            private String mExceptionMsgType = null;
088:
089:            /** 
090:             * component name
091:             */
092:            private String mComponentName = null;
093:
094:            /**
095:             * Creates a new instance of MessageContentHolder with a message type.
096:             * @param msgType String describing the message type to build.
097:             *
098:             */
099:            public ComponentMessageHolder(String msgType) {
100:                mMsgTypeToBuild = msgType;
101:            }
102:
103:            /**
104:             * Set the name of the task executed by component. 
105:             * 
106:             * @param taskName - task executed by component. 
107:             * 
108:             */
109:            public void setTaskName(String taskName) {
110:                mTaskName = taskName;
111:            }
112:
113:            /**
114:             * Set the name of the component that executed the task.
115:             * 
116:             * @param name - Name of the component.
117:             * 
118:             */
119:            public void setComponentName(String name) {
120:                mComponentName = name;
121:            }
122:
123:            /**
124:             * Set the result of the task executed by component. 
125:             * 
126:             * @param taskResult - result of task executed by component. 
127:             * 
128:             */
129:            public void setTaskResult(String taskResult) {
130:                mTaskResult = taskResult;
131:            }
132:
133:            /**
134:             * Set the exception object.  
135:             * 
136:             * @param exObj - exception object. 
137:             * 
138:             */
139:            public void setExceptionObject(Throwable exObj) {
140:                mExceptionObject = exObj;
141:            }
142:
143:            /**
144:             * Set the message type being returned by the component.  
145:             * 
146:             * @param statMsgType - type of success message that is 
147:             *                      being returned by the component.
148:             * 
149:             */
150:            public void setStatusMessageType(String statMsgType) {
151:                mStatusMsgType = statMsgType;
152:            }
153:
154:            /**
155:             * Set the exception message type being returned by the component.  
156:             * 
157:             * @param exMsgType - type of exception message that is 
158:             *                     being returned by the component.
159:             * 
160:             */
161:            public void setExceptionMessageType(String exMsgType) {
162:                mExceptionMsgType = exMsgType;
163:            }
164:
165:            /**
166:             * Set the message token for the exception being
167:             * thrown by the component. 
168:             * 
169:             * @param nestingLevel - nesting level of the exception
170:             * @param locToken - message token. 
171:             * 
172:             */
173:            public void setLocToken(int nestingLevel, String locToken) {
174:                mLocTokenCache.put(String.valueOf(nestingLevel), locToken);
175:            }
176:
177:            /**
178:             * Set the message for the exception being
179:             * thrown by the component. 
180:             * 
181:             * @param nestingLevel - nesting level of the exception.
182:             * @param locMessage - exception message. 
183:             * 
184:             */
185:            public void setLocMessage(int nestingLevel, String locMessage) {
186:                mLocMessageCache.put(String.valueOf(nestingLevel), locMessage);
187:            }
188:
189:            /**
190:             * Set the message parameters for the exception being
191:             * thrown by the component. 
192:             * 
193:             * @param nestingLevel - nesting level of the exception.
194:             * @param locParam - exception message parameters. 
195:             * 
196:             */
197:            public void setLocParam(int nestingLevel, String[] locParam) {
198:                mLocParamCache.put(String.valueOf(nestingLevel), locParam);
199:            }
200:
201:            /** Returns the message token.
202:             *  @param nestingLevel nesting level of the exception.
203:             *  @return message token at the given nesting level.
204:             *
205:             */
206:            public String getLocToken(int nestingLevel) {
207:                return (String) mLocTokenCache
208:                        .get(String.valueOf(nestingLevel));
209:            }
210:
211:            /** Returns the exception message.
212:             *  @param nestingLevel nesting level of the exception
213:             *  @return exception message at the given nesting level
214:             */
215:            public String getLocMessage(int nestingLevel) {
216:                return (String) mLocMessageCache.get(String
217:                        .valueOf(nestingLevel));
218:            }
219:
220:            /** Returns the exception message parameters.
221:             *  @param nestingLevel nesting level of the exception.
222:             *  @return exception message parameters at the given nesting level.
223:             *
224:             */
225:            public String[] getLocParam(int nestingLevel) {
226:                return (String[]) mLocParamCache.get(String
227:                        .valueOf(nestingLevel));
228:            }
229:
230:            /**
231:             * Get the exception object being thrown by this component.
232:             * @return Exception Object.
233:             *
234:             */
235:            public Throwable getExceptionObject() {
236:                return mExceptionObject;
237:            }
238:
239:            /**
240:             * Get the name of the task executed by this component.
241:             * @return Task name.
242:             *
243:             */
244:            public String getTaskName() {
245:                return mTaskName;
246:            }
247:
248:            /**
249:             * Get the result of the task executed by this component.
250:             * @return Task Result.
251:             *
252:             */
253:            public String getTaskResult() {
254:                return mTaskResult;
255:            }
256:
257:            /**
258:             * Get the type(status, exception) of message to be built
259:             * for this component.
260:             * @return Task Result.
261:             *
262:             */
263:            public String getComponentMessageType() {
264:                return mMsgTypeToBuild;
265:            }
266:
267:            /**
268:             * Get the status message type being returned by the component.
269:             * 
270:             * @return Status message type.
271:             *
272:             */
273:            public String getStatusMessageType() {
274:                return mStatusMsgType;
275:            }
276:
277:            /**
278:             * Get the exception message type being returned by the component.
279:             * 
280:             * @return Status message type.
281:             *
282:             */
283:            public String getExceptionMessageType() {
284:                return mExceptionMsgType;
285:            }
286:
287:            /**
288:             * Return the name of the component.
289:             * 
290:             * @return component name.
291:             *
292:             */
293:            public String getComponentName() {
294:                return mComponentName;
295:            }
296:
297:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.