Source Code Cross Referenced for ProxyBindingStatisticsBase.java in  » ESB » open-esb » com » sun » jbi » binding » proxy » 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.binding.proxy 
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:         * @(#)ProxyBindingStatisticsBase.java
025:         * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026:         *
027:         * END_HEADER - DO NOT EDIT
028:         */
029:        package com.sun.jbi.binding.proxy;
030:
031:        import java.util.Date;
032:        import com.sun.jbi.util.monitoring.StatisticsBaseImpl;
033:        import com.sun.jbi.monitoring.ProxyBindingStatisticsBaseMBean;
034:
035:        /**
036:         * This class provides the statistics implementation for  the ProxyBinding.
037:         * All statistics are since the last JBI startup; they are all reset when 
038:         * JBI is restarted.
039:         *
040:         * @author Sun Microsystems, Inc.
041:         */
042:        public class ProxyBindingStatisticsBase implements 
043:                ProxyBindingStatisticsBaseMBean {
044:            /**
045:             *  Instance of StatisticsBase for manipulating the object tree
046:             */
047:            private StatisticsBaseImpl mStatisticsBase;
048:
049:            /** 
050:             *  exchanges sent by the ProxyBinding for all consumers
051:             */
052:            private long mExchangesSent;
053:
054:            /** 
055:             *  exchanges received by the ProxyBinding for all producers
056:             */
057:            private long mExchangesReceived;
058:
059:            /** 
060:             *  bytes sent by the ProxyBinding for all consumers
061:             */
062:            private long mBytesSent;
063:
064:            /** 
065:             *  bytes received by the ProxyBinding for all producers
066:             */
067:            private long mBytesReceived;
068:
069:            /** 
070:             *  messages received by the ProxyBinding for all producers
071:             */
072:            private long mMessagesReceived;
073:
074:            /** 
075:             *  messages sent by the ProxyBinding for all consumers
076:             */
077:            private long mMessagesSent;
078:
079:            /** 
080:             *  messages faults generated in the ProxyBinding
081:             */
082:            private long mMessageFaults;
083:
084:            /** 
085:             *  messages errors generated in the ProxyBinding
086:             */
087:            private long mMessageErrors;
088:
089:            /** 
090:             *  message exchanges in COMPLETED state
091:             */
092:            private long mCompletedExchanges;
093:
094:            /** constructor. */
095:            public ProxyBindingStatisticsBase() {
096:                mStatisticsBase = new StatisticsBaseImpl("SunProxyBinding");
097:            }
098:
099:            /**
100:             * Increment the current Exchanges sent by the PB.
101:             */
102:            public synchronized void incrementSentExchanges() {
103:                mExchangesSent++;
104:            }
105:
106:            /**
107:             * Increment the current Exchanges received by the PB.
108:             */
109:            public synchronized void incrementReceivedExchanges() {
110:                mExchangesReceived++;
111:            }
112:
113:            /**
114:             * Increment the current bytes sent by the PB.
115:             * @param bytes the number of bytes to increment.
116:             */
117:            public synchronized void incrementSentBytes(long bytes) {
118:                mBytesSent += bytes;
119:            }
120:
121:            /**
122:             * Increment the current bytes received by the PB.
123:             * @param bytes the number of bytes to increment.
124:             */
125:            public synchronized void incrementReceivedBytes(long bytes) {
126:                mBytesReceived += bytes;
127:            }
128:
129:            /**
130:             * Increment the total number of Messages sent by the PB.
131:             * @param messages the number of incremental sent messages
132:             */
133:            public synchronized void incrementSentMessages(int messages) {
134:                mMessagesSent += messages;
135:            }
136:
137:            /**
138:             * Increment the total number of Messages received by the PB.
139:             * @param messages the number of incremental received messages
140:             */
141:            public synchronized void incrementReceivedMessages(int messages) {
142:                mMessagesReceived += messages;
143:            }
144:
145:            /**
146:             * Increment the current number of Message faults
147:             * since the last PB startup.
148:             */
149:            public synchronized void incrementMessageFaults() {
150:                mMessageFaults++;
151:            }
152:
153:            /**
154:             * Increment the current number of Message errors
155:             * since the last PB startup.
156:             */
157:            public synchronized void incrementMessageErrors() {
158:                mMessageErrors++;
159:            }
160:
161:            /**
162:             * Increment the total number of completed Exchanges 
163:             * since the last PB startup.
164:             */
165:            public synchronized void incrementCompletedExchanges() {
166:                mCompletedExchanges++;
167:            }
168:
169:            /**
170:             * Reset all statistics.
171:             */
172:            public synchronized void resetAllStatistics() {
173:                mExchangesSent = 0;
174:                mExchangesReceived = 0;
175:                mBytesSent = 0;
176:                mBytesReceived = 0;
177:                mMessagesReceived = 0;
178:                mMessagesSent = 0;
179:                mMessageFaults = 0;
180:                mMessageErrors = 0;
181:                mCompletedExchanges = 0;
182:            }
183:
184:            // methods on StatisticsBase
185:            /**
186:             * Test whether or not statistics are enabled.
187:             * @return true if statistics are enabled, false if not.
188:             */
189:            public boolean isEnabled() {
190:                return mStatisticsBase.isEnabled();
191:            }
192:
193:            /**
194:             * Disable statistics.
195:             */
196:            public void setDisabled() {
197:                mStatisticsBase.setDisabled();
198:            }
199:
200:            // methods on ProxyBindingStatisticsBaseMBean
201:            /**
202:             * Get the number of ME's sent by the PB for all JBI components
203:             * as consumers.
204:             * @return The current number of sent exchanges.
205:             */
206:            public long getSentExchanges() {
207:                return mExchangesSent;
208:            }
209:
210:            /**
211:             * Get the number of ME's received by the PB for all JBI components
212:             * as providers.
213:             * @return The current number of received exchanges.
214:             */
215:            public long getReceivedExchanges() {
216:                return mExchangesReceived;
217:            }
218:
219:            /**
220:             * Get the total bytes sent by the PB for all JBI components
221:             * as consumers.
222:             * @return The current bytes sent by the PB.
223:             */
224:            public long getSentBytes() {
225:                return mBytesSent;
226:            }
227:
228:            /**
229:             * Get the total bytes received by the PB for all JBI components
230:             * as providers.
231:             * @return The current bytes received by the PB.
232:             */
233:            public long getReceivedBytes() {
234:                return mBytesReceived;
235:            }
236:
237:            /**
238:             * Get the total messages sent by the PB for all JBI components
239:             * as consumers.
240:             * @return The current messages sent by the PB.
241:             */
242:            public long getSentMessages() {
243:                return mMessagesSent;
244:            }
245:
246:            /**
247:             * Get the total messages received by the PB for all JBI components
248:             * as providers.
249:             * @return The current messages received by the PB.
250:             */
251:            public long getReceivedMessages() {
252:                return mMessagesReceived;
253:            }
254:
255:            /**
256:             * Get the total number of Message Faults created since the
257:             * last NMR startup.
258:             * @return The number of message faults.
259:             */
260:            public long getMessageFaults() {
261:                return mMessageFaults;
262:            }
263:
264:            /**
265:             * Get the total number of Message Errors created since the
266:             * last NMR startup.
267:             * @return The number of message errors.
268:             */
269:            public long getMessageErrors() {
270:                return mMessageErrors;
271:            }
272:
273:            /**
274:             * Get the total number of completed Message Exchanges created since the
275:             * last NMR startup.
276:             * @return The number of completed MEs.
277:             */
278:            public long getCompletedExchanges() {
279:                return mCompletedExchanges;
280:            }
281:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.