Source Code Cross Referenced for EndpointStatisticsData.java in  » ESB » open-esb » com » sun » esb » management » common » data » 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.esb.management.common.data 
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:         * @(#)EndpointStatisticsData.java
025:         * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026:         *
027:         * END_HEADER - DO NOT EDIT
028:         */
029:
030:        package com.sun.esb.management.common.data;
031:
032:        import java.io.Serializable;
033:        import java.util.Collection;
034:        import java.util.Date;
035:        import java.util.HashMap;
036:        import java.util.Iterator;
037:        import java.util.Map;
038:
039:        import javax.management.openmbean.CompositeData;
040:        import javax.management.openmbean.CompositeType;
041:        import javax.management.openmbean.TabularData;
042:        import javax.xml.parsers.ParserConfigurationException;
043:        import javax.xml.transform.TransformerException;
044:
045:        import com.sun.esb.management.common.ManagementRemoteException;
046:        import com.sun.esb.management.common.data.helper.ConsumingEndpointStatisticsDataCreator;
047:        import com.sun.esb.management.common.data.helper.EndpointStatisticsDataWriter;
048:        import com.sun.esb.management.common.data.helper.ProvisioningEndpointStatisticsDataCreator;
049:
050:        /**
051:         * Provides Endpoint Statistics
052:         * 
053:         * @author graj
054:         * 
055:         */
056:        public abstract class EndpointStatisticsData implements 
057:                IEndpointStatisticsData, Serializable {
058:            static final long serialVersionUID = -1L;
059:
060:            public static final String INSTANCE_NAME_KEY = "InstanceName";
061:
062:            public static final String COMPONENT_NAME_KEY = "ComponentName";
063:
064:            public static final String NUM_ACTIVE_EXCHANGES_KEY = "NumActiveExchanges";
065:
066:            public static final String NUM_RECEIVED_DONES_KEY = "NumReceivedDONEs";
067:
068:            public static final String NUM_SENT_DONES_KEY = "NumSentDONEs";
069:
070:            public static final String NUM_RECEIVED_FAULTS_KEY = "NumReceivedFaults";
071:
072:            public static final String NUM_SENT_FAULTS_KEY = "NumSentFaults";
073:
074:            public static final String NUM_RECEIVED_ERRORS_KEY = "NumReceivedErrors";
075:
076:            public static final String NUM_SENT_ERRORS_KEY = "NumSentErrors";
077:
078:            public static final String ME_COMPONENT_TIME_AVG_KEY = "MessageExchangeComponentTime Avg (ns)";
079:
080:            public static final String ME_DELIVERY_CHANNEL_TIME_AVG_KEY = "MessageExchangeDeliveryTime Avg (ns)";
081:
082:            public static final String ME_MESSAGE_SERVICE_TIME_AVG_KEY = "MessageExchangeNMRTime Avg (ns)";
083:
084:            public static final String PERFORMANCE_MEASUREMENTS_KEY = "PerformanceMeasurements";
085:
086:            protected boolean isProvisioningEndpoint;
087:
088:            protected String componentName;
089:
090:            protected String instanceName;
091:
092:            protected long numberOfActiveExchanges;
093:
094:            protected long numberOfReceivedDones;
095:
096:            protected long numberOfSentDones;
097:
098:            protected long numberOfReceivedFaults;
099:
100:            protected long numberOfReceivedErrors;
101:
102:            protected long numberOfSentFaults;
103:
104:            protected long numberOfSentErrors;
105:
106:            protected long messageExchangeComponentTimeAverage;
107:
108:            protected long messageExchangeDeliveryChannelTimeAverage;
109:
110:            protected long messageExchangeServiceTimeAverage;
111:
112:            protected Map<String /* category */, PerformanceData> categoryToPerformanceDataMap = new HashMap<String /* category */, PerformanceData>();
113:
114:            /** Constructor - creates an EndpointStatisticsData object */
115:            public EndpointStatisticsData() {
116:            }
117:
118:            /**
119:             * Constructor - creates an EndpointStatisticsData object
120:             * 
121:             * @param data
122:             */
123:            public EndpointStatisticsData(EndpointStatisticsData data) {
124:                this .setCategoryToPerformanceDataMap(data
125:                        .getCategoryToPerformanceDataMap());
126:                this .setInstanceName(data.getInstanceName());
127:                this .setComponentName(data.getComponentName());
128:                this .setNumberOfActiveExchanges(data
129:                        .getNumberOfActiveExchanges());
130:                this .setMessageExchangeComponentTimeAverage(data
131:                        .getMessageExchangeComponentTimeAverage());
132:                this .setMessageExchangeDeliveryChannelTimeAverage(data
133:                        .getMessageExchangeDeliveryChannelTimeAverage());
134:                this .setMessageExchangeServiceTimeAverage(data
135:                        .getMessageExchangeServiceTimeAverage());
136:                this .setNumberOfReceivedDones(data.getNumberOfReceivedDones());
137:                this 
138:                        .setNumberOfReceivedErrors(data
139:                                .getNumberOfReceivedErrors());
140:                this 
141:                        .setNumberOfReceivedFaults(data
142:                                .getNumberOfReceivedFaults());
143:                this .setNumberOfSentDones(data.getNumberOfSentDones());
144:                this .setNumberOfSentErrors(data.getNumberOfSentErrors());
145:                this .setNumberOfSentFaults(data.getNumberOfSentFaults());
146:            }
147:
148:            /**
149:             * Generate Tabular Data for this object
150:             * @return tabular data of this object
151:             */
152:            static public TabularData generateTabularData(
153:                    Map<String /* instanceName */, IEndpointStatisticsData> map) {
154:                TabularData tabularData = null;
155:                boolean isProvisioningEndpoint = false;
156:                Collection<IEndpointStatisticsData> collection = map.values();
157:                for (IEndpointStatisticsData data : collection) {
158:                    if (data.isProvisioningEndpoint() == true) {
159:                        isProvisioningEndpoint = true;
160:                    }
161:                    break;
162:                }
163:                try {
164:                    if (isProvisioningEndpoint == true) {
165:                        tabularData = ProvisioningEndpointStatisticsDataCreator
166:                                .createTabularData(map);
167:                    } else {
168:                        tabularData = ConsumingEndpointStatisticsDataCreator
169:                                .createTabularData(map);
170:                    }
171:                } catch (ManagementRemoteException e) {
172:                }
173:                return tabularData;
174:            }
175:
176:            /**
177:             * Retrieves the Endpoint Statistics Data
178:             * 
179:             * @param tabularData
180:             * @return NMR Statistics Data
181:             */
182:            @SuppressWarnings("unchecked")
183:            static public Map<String /* instanceName */, IEndpointStatisticsData> retrieveDataMap(
184:                    TabularData tabularData) {
185:                IEndpointStatisticsData data = null;
186:                ProvisioningEndpointStatisticsData provisioningData = null;
187:                ConsumingEndpointStatisticsData consumingData = null;
188:                Map<String /* instanceName */, IEndpointStatisticsData> map = null;
189:                map = new HashMap<String /* instanceName */, IEndpointStatisticsData>();
190:                for (Iterator dataIterator = tabularData.values().iterator(); dataIterator
191:                        .hasNext();) {
192:                    CompositeData compositeData = (CompositeData) dataIterator
193:                            .next();
194:                    CompositeType compositeType = compositeData
195:                            .getCompositeType();
196:                    if (compositeType
197:                            .keySet()
198:                            .contains(
199:                                    ProvisioningEndpointStatisticsData.ACTIVATION_TIME_KEY)
200:                            || compositeType
201:                                    .keySet()
202:                                    .contains(
203:                                            ProvisioningEndpointStatisticsData.ME_RESPONSE_TIME_AVG_KEY)
204:                            || compositeType
205:                                    .keySet()
206:                                    .contains(
207:                                            ProvisioningEndpointStatisticsData.NUM_RECEIVED_REQUESTS_KEY)
208:                            || compositeType
209:                                    .keySet()
210:                                    .contains(
211:                                            ProvisioningEndpointStatisticsData.NUM_SENT_REPLIES_KEY)
212:                            || compositeType
213:                                    .keySet()
214:                                    .contains(
215:                                            ProvisioningEndpointStatisticsData.UPTIME_KEY)) {
216:                        data = new ProvisioningEndpointStatisticsData();
217:                        provisioningData = (ProvisioningEndpointStatisticsData) data;
218:                    } else {
219:                        data = new ConsumingEndpointStatisticsData();
220:                        consumingData = (ConsumingEndpointStatisticsData) data;
221:                    }
222:                    for (Iterator<String> itemIterator = compositeType.keySet()
223:                            .iterator(); itemIterator.hasNext();) {
224:                        String item = (String) itemIterator.next();
225:                        // 1. Read all the Provisioning Endpoints first
226:                        if (true == item
227:                                .equals(ProvisioningEndpointStatisticsData.ACTIVATION_TIME_KEY)) {
228:                            if (data == null) {
229:                                data = new ProvisioningEndpointStatisticsData();
230:                                provisioningData = (ProvisioningEndpointStatisticsData) data;
231:                            }
232:                            Date value = (Date) compositeData.get(item);
233:                            provisioningData.setActivationTime(value);
234:                        }
235:                        if (true == item
236:                                .equals(ProvisioningEndpointStatisticsData.NUM_RECEIVED_REQUESTS_KEY)) {
237:                            if (data == null) {
238:                                data = new ProvisioningEndpointStatisticsData();
239:                                provisioningData = (ProvisioningEndpointStatisticsData) data;
240:                            }
241:                            Long value = (Long) compositeData.get(item);
242:                            if (value != null) {
243:                                provisioningData
244:                                        .setNumberOfReceivedRequests(value
245:                                                .longValue());
246:                            }
247:                        }
248:                        if (true == item
249:                                .equals(ProvisioningEndpointStatisticsData.NUM_SENT_REPLIES_KEY)) {
250:                            if (data == null) {
251:                                data = new ProvisioningEndpointStatisticsData();
252:                                provisioningData = (ProvisioningEndpointStatisticsData) data;
253:                            }
254:                            Long value = (Long) compositeData.get(item);
255:                            if (value != null) {
256:                                provisioningData.setNumberOfSentReplies(value
257:                                        .longValue());
258:                            }
259:                        }
260:                        if (true == item
261:                                .equals(ProvisioningEndpointStatisticsData.UPTIME_KEY)) {
262:                            if (data == null) {
263:                                data = new ProvisioningEndpointStatisticsData();
264:                                provisioningData = (ProvisioningEndpointStatisticsData) data;
265:                            }
266:                            Long value = (Long) compositeData.get(item);
267:                            if (value != null) {
268:                                provisioningData.setUptime(value.longValue());
269:                            }
270:                        }
271:                        if (true == item
272:                                .equals(ProvisioningEndpointStatisticsData.ME_RESPONSE_TIME_AVG_KEY)) {
273:                            if (data == null) {
274:                                data = new ProvisioningEndpointStatisticsData();
275:                                provisioningData = (ProvisioningEndpointStatisticsData) data;
276:                            }
277:                            Long value = (Long) compositeData.get(item);
278:                            if (value != null) {
279:                                provisioningData
280:                                        .setMessageExchangeResponseTimeAverage(value
281:                                                .longValue());
282:                            }
283:                        }
284:                        // 2. Read all the Consuming Endpoints.
285:                        if (true == item
286:                                .equals(ConsumingEndpointStatisticsData.NUM_RECEIVED_REPLIES_KEY)) {
287:                            if (data == null) {
288:                                data = new ConsumingEndpointStatisticsData();
289:                                consumingData = (ConsumingEndpointStatisticsData) data;
290:                            }
291:                            Long value = (Long) compositeData.get(item);
292:                            if (value != null) {
293:                                consumingData.setNumberOfReceivedReplies(value
294:                                        .longValue());
295:                            }
296:                        }
297:                        if (true == item
298:                                .equals(ConsumingEndpointStatisticsData.NUM_SENT_REQUESTS_KEY)) {
299:                            if (data == null) {
300:                                data = new ConsumingEndpointStatisticsData();
301:                                consumingData = (ConsumingEndpointStatisticsData) data;
302:                            }
303:                            Long value = (Long) compositeData.get(item);
304:                            if (value != null) {
305:                                consumingData.setNumberOfSentRequests(value
306:                                        .longValue());
307:                            }
308:                        }
309:                        if (true == item
310:                                .equals(ConsumingEndpointStatisticsData.ME_STATUS_TIME_AVG_KEY)) {
311:                            if (data == null) {
312:                                data = new ConsumingEndpointStatisticsData();
313:                                consumingData = (ConsumingEndpointStatisticsData) data;
314:                            }
315:                            Long value = (Long) compositeData.get(item);
316:                            if (value != null) {
317:                                consumingData
318:                                        .setMessageExchangeStatusTimeAverage(value
319:                                                .longValue());
320:                            }
321:                        }
322:                        // 3. Read all the base Endpoint Statistics Data.
323:                        if (true == item
324:                                .equals(EndpointStatisticsData.INSTANCE_NAME_KEY)) {
325:                            String value = (String) compositeData.get(item);
326:                            if (data != null) {
327:                                data.setInstanceName(value);
328:                            }
329:                        }
330:                        if (true == item
331:                                .equals(EndpointStatisticsData.COMPONENT_NAME_KEY)) {
332:                            String value = (String) compositeData.get(item);
333:                            if (data == null) {
334:                                data.setComponentName(value);
335:                            }
336:                        }
337:                        if (true == item
338:                                .equals(EndpointStatisticsData.NUM_ACTIVE_EXCHANGES_KEY)) {
339:                            Long value = (Long) compositeData.get(item);
340:                            if (value != null) {
341:                                data.setNumberOfActiveExchanges(value
342:                                        .longValue());
343:                            }
344:                        }
345:                        if (true == item
346:                                .equals(EndpointStatisticsData.ME_COMPONENT_TIME_AVG_KEY)) {
347:                            Long value = (Long) compositeData.get(item);
348:                            if (data != null) {
349:                                if (value != null) {
350:                                    data
351:                                            .setMessageExchangeComponentTimeAverage(value
352:                                                    .longValue());
353:                                }
354:                            }
355:                        }
356:                        if (true == item
357:                                .equals(EndpointStatisticsData.ME_DELIVERY_CHANNEL_TIME_AVG_KEY)) {
358:                            Long value = (Long) compositeData.get(item);
359:                            if (data != null) {
360:                                if (value != null) {
361:                                    data
362:                                            .setMessageExchangeDeliveryChannelTimeAverage(value
363:                                                    .longValue());
364:                                }
365:                            }
366:                        }
367:                        if (true == item
368:                                .equals(EndpointStatisticsData.ME_MESSAGE_SERVICE_TIME_AVG_KEY)) {
369:                            Long value = (Long) compositeData.get(item);
370:                            if (data != null) {
371:                                if (value != null) {
372:                                    data
373:                                            .setMessageExchangeServiceTimeAverage(value
374:                                                    .longValue());
375:                                }
376:                            }
377:                        }
378:                        if (true == item
379:                                .equals(EndpointStatisticsData.NUM_RECEIVED_DONES_KEY)) {
380:                            Long value = (Long) compositeData.get(item);
381:                            if (data != null) {
382:                                if (value != null) {
383:                                    data.setNumberOfReceivedDones(value
384:                                            .longValue());
385:                                }
386:                            }
387:                        }
388:                        if (true == item
389:                                .equals(EndpointStatisticsData.NUM_RECEIVED_ERRORS_KEY)) {
390:                            Long value = (Long) compositeData.get(item);
391:                            if (data != null) {
392:                                if (value != null) {
393:                                    data.setNumberOfReceivedErrors(value
394:                                            .longValue());
395:                                }
396:                            }
397:                        }
398:                        if (true == item
399:                                .equals(EndpointStatisticsData.NUM_RECEIVED_FAULTS_KEY)) {
400:                            Long value = (Long) compositeData.get(item);
401:                            if (data != null) {
402:                                if (value != null) {
403:                                    data.setNumberOfReceivedFaults(value
404:                                            .longValue());
405:                                }
406:                            }
407:                        }
408:                        if (true == item
409:                                .equals(EndpointStatisticsData.NUM_SENT_DONES_KEY)) {
410:                            Long value = (Long) compositeData.get(item);
411:                            if (data != null) {
412:                                if (value != null) {
413:                                    data
414:                                            .setNumberOfSentDones(value
415:                                                    .longValue());
416:                                }
417:                            }
418:                        }
419:                        if (true == item
420:                                .equals(EndpointStatisticsData.NUM_SENT_ERRORS_KEY)) {
421:                            Long value = (Long) compositeData.get(item);
422:                            if (data != null) {
423:                                if (value != null) {
424:                                    data.setNumberOfSentErrors(value
425:                                            .longValue());
426:                                }
427:                            }
428:                        }
429:                        if (true == item
430:                                .equals(EndpointStatisticsData.NUM_SENT_FAULTS_KEY)) {
431:                            Long value = (Long) compositeData.get(item);
432:                            if (data != null) {
433:                                if (value != null) {
434:                                    data.setNumberOfSentFaults(value
435:                                            .longValue());
436:                                }
437:                            }
438:                        }
439:                        if (true == item
440:                                .equals(EndpointStatisticsData.PERFORMANCE_MEASUREMENTS_KEY)) {
441:                            Map<String /* Category */, PerformanceData> performanceMap = null;
442:                            TabularData value = (TabularData) compositeData
443:                                    .get(item);
444:                            if (value != null) {
445:                                performanceMap = PerformanceData
446:                                        .retrieveDataMap(value);
447:                            }
448:                            if (data != null) {
449:                                data
450:                                        .setCategoryToPerformanceDataMap(performanceMap);
451:                            }
452:                        }
453:                    }
454:                    map.put(data.getInstanceName(), data);
455:                }
456:                return map;
457:            }
458:
459:            /**
460:             * Converts a Component Statistics Data to an XML String
461:             * 
462:             * @param map
463:             * @return XML string representing a Component Statistics Datum
464:             * @throws ManagementRemoteException
465:             */
466:            static public String convertDataMapToXML(
467:                    Map<String /* instanceName */, IEndpointStatisticsData> map)
468:                    throws ManagementRemoteException {
469:                String xmlText = null;
470:                try {
471:                    xmlText = EndpointStatisticsDataWriter.serialize(map);
472:                } catch (ParserConfigurationException e) {
473:                    throw new ManagementRemoteException(e);
474:                } catch (TransformerException e) {
475:                    throw new ManagementRemoteException(e);
476:                }
477:
478:                return xmlText;
479:
480:            }
481:
482:            /**
483:             * @return the instanceName
484:             */
485:            public String getInstanceName() {
486:                return this .instanceName;
487:            }
488:
489:            /**
490:             * @return the isProvisioningEndpoint
491:             */
492:            public boolean isProvisioningEndpoint() {
493:                return this .isProvisioningEndpoint;
494:            }
495:
496:            /**
497:             * @return the componentName
498:             */
499:            public String getComponentName() {
500:                return this .componentName;
501:            }
502:
503:            /**
504:             * @param componentName the componentName to set
505:             */
506:            public void setComponentName(String componentName) {
507:                this .componentName = componentName;
508:            }
509:
510:            /**
511:             * @return the numberOfActiveExchanges
512:             */
513:            public long getNumberOfActiveExchanges() {
514:                return this .numberOfActiveExchanges;
515:            }
516:
517:            /**
518:             * @param numberOfActiveExchanges
519:             *            the numberOfActiveExchanges to set
520:             */
521:            public void setNumberOfActiveExchanges(long numberOfActiveExchanges) {
522:                this .numberOfActiveExchanges = numberOfActiveExchanges;
523:            }
524:
525:            /**
526:             * @param isProvisioningEndpoint
527:             *            the isProvisioningEndpoint to set
528:             */
529:            public void setProvisioningEndpoint(boolean isProvisioningEndpoint) {
530:                this .isProvisioningEndpoint = isProvisioningEndpoint;
531:            }
532:
533:            /**
534:             * @param instanceName
535:             *            the instanceName to set
536:             */
537:            public void setInstanceName(String instanceName) {
538:                this .instanceName = instanceName;
539:            }
540:
541:            /**
542:             * @return the numberOfReceivedDones
543:             */
544:            public long getNumberOfReceivedDones() {
545:                return this .numberOfReceivedDones;
546:            }
547:
548:            /**
549:             * @param numberOfReceivedDones
550:             *            the numberOfReceivedDones to set
551:             */
552:            public void setNumberOfReceivedDones(long numberOfReceivedDones) {
553:                this .numberOfReceivedDones = numberOfReceivedDones;
554:            }
555:
556:            /**
557:             * @return the numberOfSentDones
558:             */
559:            public long getNumberOfSentDones() {
560:                return this .numberOfSentDones;
561:            }
562:
563:            /**
564:             * @param numberOfSentDones
565:             *            the numberOfSentDones to set
566:             */
567:            public void setNumberOfSentDones(long numberOfSentDones) {
568:                this .numberOfSentDones = numberOfSentDones;
569:            }
570:
571:            /**
572:             * @return the numberOfReceivedFaults
573:             */
574:            public long getNumberOfReceivedFaults() {
575:                return this .numberOfReceivedFaults;
576:            }
577:
578:            /**
579:             * @param numberOfReceivedFaults
580:             *            the numberOfReceivedFaults to set
581:             */
582:            public void setNumberOfReceivedFaults(long numberOfReceivedFaults) {
583:                this .numberOfReceivedFaults = numberOfReceivedFaults;
584:            }
585:
586:            /**
587:             * @return the numberOfReceivedErrors
588:             */
589:            public long getNumberOfReceivedErrors() {
590:                return this .numberOfReceivedErrors;
591:            }
592:
593:            /**
594:             * @param numberOfReceivedErrors
595:             *            the numberOfReceivedErrors to set
596:             */
597:            public void setNumberOfReceivedErrors(long numberOfReceivedErrors) {
598:                this .numberOfReceivedErrors = numberOfReceivedErrors;
599:            }
600:
601:            /**
602:             * @return the numberOfSentFaults
603:             */
604:            public long getNumberOfSentFaults() {
605:                return this .numberOfSentFaults;
606:            }
607:
608:            /**
609:             * @param numberOfSentFaults
610:             *            the numberOfSentFaults to set
611:             */
612:            public void setNumberOfSentFaults(long numberOfSentFaults) {
613:                this .numberOfSentFaults = numberOfSentFaults;
614:            }
615:
616:            /**
617:             * @return the numberOfSentErrors
618:             */
619:            public long getNumberOfSentErrors() {
620:                return this .numberOfSentErrors;
621:            }
622:
623:            /**
624:             * @param numberOfSentErrors
625:             *            the numberOfSentErrors to set
626:             */
627:            public void setNumberOfSentErrors(long numberOfSentErrors) {
628:                this .numberOfSentErrors = numberOfSentErrors;
629:            }
630:
631:            /**
632:             * @return the messageExchangeComponentTimeAverage
633:             */
634:            public long getMessageExchangeComponentTimeAverage() {
635:                return this .messageExchangeComponentTimeAverage;
636:            }
637:
638:            /**
639:             * @param messageExchangeComponentTimeAverage
640:             *            the messageExchangeComponentTimeAverage to set
641:             */
642:            public void setMessageExchangeComponentTimeAverage(
643:                    long messageExchangeComponentTimeAverage) {
644:                this .messageExchangeComponentTimeAverage = messageExchangeComponentTimeAverage;
645:            }
646:
647:            /**
648:             * @return the messageExchangeDeliveryChannelTimeAverage
649:             */
650:            public long getMessageExchangeDeliveryChannelTimeAverage() {
651:                return this .messageExchangeDeliveryChannelTimeAverage;
652:            }
653:
654:            /**
655:             * @param messageExchangeDeliveryChannelTimeAverage
656:             *            the messageExchangeDeliveryChannelTimeAverage to set
657:             */
658:            public void setMessageExchangeDeliveryChannelTimeAverage(
659:                    long messageExchangeDeliveryChannelTimeAverage) {
660:                this .messageExchangeDeliveryChannelTimeAverage = messageExchangeDeliveryChannelTimeAverage;
661:            }
662:
663:            /**
664:             * @return the messageExchangeServiceTimeAverage
665:             */
666:            public long getMessageExchangeServiceTimeAverage() {
667:                return this .messageExchangeServiceTimeAverage;
668:            }
669:
670:            /**
671:             * @param messageExchangeServiceTimeAverage
672:             *            the messageExchangeServiceTimeAverage to set
673:             */
674:            public void setMessageExchangeServiceTimeAverage(
675:                    long messageExchangeServiceTimeAverage) {
676:                this .messageExchangeServiceTimeAverage = messageExchangeServiceTimeAverage;
677:            }
678:
679:            /**
680:             * @return the categoryToPerformanceDataMap
681:             */
682:            public Map<String, PerformanceData> getCategoryToPerformanceDataMap() {
683:                return this .categoryToPerformanceDataMap;
684:            }
685:
686:            /**
687:             * @param categoryToPerformanceDataMap
688:             *            the categoryToPerformanceDataMap to set
689:             */
690:            public void setCategoryToPerformanceDataMap(
691:                    Map<String, PerformanceData> categoryToPerformanceDataMap) {
692:                this .categoryToPerformanceDataMap = categoryToPerformanceDataMap;
693:            }
694:
695:            /**
696:             * Return a displayable string of values
697:             * 
698:             * @return
699:             */
700:            public String getDisplayString() {
701:                StringBuffer buffer = new StringBuffer();
702:                buffer.append("\n    Instance Name" + "="
703:                        + this .getInstanceName());
704:                buffer.append("\n    Component Name" + "="
705:                        + this .getComponentName());
706:                buffer.append("\n    Number of Active Exchanges" + "="
707:                        + this .getNumberOfActiveExchanges());
708:                buffer.append("\n    Message Exchange Component Time Average"
709:                        + "=" + this .getMessageExchangeComponentTimeAverage());
710:                buffer
711:                        .append("\n    Message Exchange Delivery Channel Time Average"
712:                                + "="
713:                                + this 
714:                                        .getMessageExchangeDeliveryChannelTimeAverage());
715:                buffer.append("\n    Message Exchange Service Time Average"
716:                        + "=" + this .getMessageExchangeServiceTimeAverage());
717:                buffer.append("\n    Number Of Received Dones" + "="
718:                        + this .getNumberOfReceivedDones());
719:                buffer.append("\n    Number Of Received Faults" + "="
720:                        + this .getNumberOfReceivedFaults());
721:                buffer.append("\n    Number Of Received Errors" + "="
722:                        + this .getNumberOfReceivedErrors());
723:                buffer.append("\n    Number Of Sent Dones" + "="
724:                        + this .getNumberOfSentDones());
725:                buffer.append("\n    Number Of Sent Errors" + "="
726:                        + this .getNumberOfSentErrors());
727:                buffer.append("\n    Number Of Sent Faults" + "="
728:                        + this .getNumberOfSentFaults());
729:                for (String category : this .getCategoryToPerformanceDataMap()
730:                        .keySet()) {
731:                    System.out.println(this .getCategoryToPerformanceDataMap()
732:                            .get(category).getDisplayString());
733:                }
734:                buffer.append("\n");
735:                return buffer.toString();
736:            }
737:
738:            /**
739:             * @param args
740:             */
741:            public static void main(String[] args) {
742:                // TODO Auto-generated method stub
743:
744:            }
745:
746:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.