Java Doc for ProxyMonitor.java in  » Profiler » JMeasurement » de » mcs » jmeasurement » 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 » Profiler » JMeasurement » de.mcs.jmeasurement.proxy 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.mcs.jmeasurement.proxy.ProxyMonitor

ProxyMonitor
public class ProxyMonitor implements InvocationHandler(Code)
This is my monitor class for monitoring interface methodes automatically. The name of the measurepoints will be automatically generated as
 [fullclassname]#[methodename]
 

since:
   0.64
author:
   W.Klaas



Constructor Summary
public  ProxyMonitor(Object aTestObject, boolean aStoreExceptions, boolean aFullExceptions, String[] aMethodNames)
     constructor for this proxy.
Parameters:
  aTestObject - object under test.
Parameters:
  aStoreExceptions - if exceptions should be stored.
Parameters:
  aFullExceptions - full exceptions with stacktraces
Parameters:
  aMethodNames - list with all methodnames that should be monitored.
public  ProxyMonitor(Object aTestObject, String[] aMethodNames)
     constructor for this proxy.

Method Summary
final public  Objectinvoke(Object proxy, Method method, Object[] args)
     This is the methode that will alway be inveked on every methode invocation of the object under test.


Constructor Detail
ProxyMonitor
public ProxyMonitor(Object aTestObject, boolean aStoreExceptions, boolean aFullExceptions, String[] aMethodNames)(Code)
constructor for this proxy.
Parameters:
  aTestObject - object under test.
Parameters:
  aStoreExceptions - if exceptions should be stored.
Parameters:
  aFullExceptions - full exceptions with stacktraces
Parameters:
  aMethodNames - list with all methodnames that should be monitored. If thisparameter is null all methods will be monitored.



ProxyMonitor
public ProxyMonitor(Object aTestObject, String[] aMethodNames)(Code)
constructor for this proxy. Using default exception handling.
Parameters:
  aTestObject - object under test.
Parameters:
  aMethodNames - list with all methodnames that should be monitored. If thisparameter is null all methods will be monitored.




Method Detail
invoke
final public Object invoke(Object proxy, Method method, Object[] args) throws Throwable(Code)
This is the methode that will alway be inveked on every methode invocation of the object under test. Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.
Parameters:
  proxy - the proxy instance that the method was invoked on
Parameters:
  method - the Method instance corresponding to theinterface method invoked on the proxy instance. The declaringclass of the Method object will be theinterface that the method was declared in, which may be asuperinterface of the proxy interface that the proxy classinherits the method through.
Parameters:
  args - an array of objects containing the values of the argumentspassed in the method invocation on the proxy instance, ornull if interface method takes no arguments.Arguments of primitive types are wrapped in instances of theappropriate primitive wrapper class, such asjava.lang.Integer orjava.lang.Boolean. the value to return from the method invocation on the proxyinstance. If the declared return type of the interface method isa primitive type, then the value returned by this method must bean instance of the corresponding primitive wrapper class;otherwise, it must be a type assignable to the declared returntype. If the value returned by this method is nulland the interface method's return type is primitive, then aNullPointerException will be thrown by the methodinvocation on the proxy instance. If the value returned by thismethod is otherwise not compatible with the interface method'sdeclared return type as described above, aClassCastException will be thrown by the methodinvocation on the proxy instance.
throws:
  Throwable - the exception to throw from the method invocation on theproxy instance. The exception's type must be assignableeither to any of the exception types declared in thethrows clause of the interface method or tothe unchecked exception typesjava.lang.RuntimeException orjava.lang.Error. If a checked exception isthrown by this method that is not assignable to any of theexception types declared in the throws clauseof the interface method, then anUndeclaredThrowableException containing the exceptionthat was thrown by this method will be thrown by the methodinvocation on the proxy instance.
See Also:   java.lang.refelct.InvocationHandler.invoke(java.lang.Objectjava.lang.reflect.Methodjava.lang.Object[])



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.