Java Doc for JoinPointManager.java in  » Byte-Code » PROSE » ch » ethz » prose » engine » 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 » Byte Code » PROSE » ch.ethz.prose.engine 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   ch.ethz.jvmai.JoinPointHook
      ch.ethz.prose.engine.JoinPointManager

All known Subclasses:   ch.ethz.prose.engine.HotSwapJoinPointManager,  ch.ethz.prose.jvmai.jikesrvm.advice_weaver.AdviceJoinPointManager,
JoinPointManager
public class JoinPointManager extends JoinPointHook implements JoinPointQuery(Code)
Class JoinPointManagerImpl defines implements two of the basic methods JoinPointManager. Subclasses of AbstractJoinPointManager should define only the link between registering event requests and the proper notification. They should use the notifyListeners method in order to notify the listeners of an event that this event occured, and invoke handleExceptions to handle notification exceptions. By providing an implementation of handleExceptions with a different handleExceptions method, subclasses may change the policy for exception handling.

All implementations of AbstractJoinPointManager should also define the abstract methods suspendListenerNotification and resumeListenerNotification
version:
   $Revision: 1.4 $
author:
   Andrei Popovici
author:
   Angela Nicoara


Inner Class :public static class ClassLoadConsumer extends Thread

Field Summary
final protected  SetclassLoadListeners
    
protected  booleanenableRevMap
    
final protected  HashSetenabledJoinPoints
    
protected  booleanisConnected
    
final protected  Maplistener2req
    
final protected  Mapreq2listener
    

Constructor Summary
public  JoinPointManager(boolean isConnected, JVMAspectInterface ai, boolean enableRevMap)
     Create an JoinPointManagerImpl with no registered listeners or events.

Method Summary
public  SetallJoinpoints()
    
public  voidconnectToJVMAI()
    
public  JoinPointRequestcreateJoinPointRequest(String kind, Object o)
    
public  voiddisconnectFromJVMAI()
    
public  JVMAspectInterfacegetAspectInterface()
    
public  SetgetCrosscuts(JoinPointRequest jpr)
    
public  SetgetJoinpoints(Crosscut cc)
    
public  ListgetLoadedClasses()
     Returns all currently loaded classes in the virtual machine.
protected  voidhandleExceptions(List exceptionList, JoinPoint crtEvent)
     This method should be called if the notification fails for some of the listeners.
protected  ExceptionhandleRuntimeException(Exception e)
     This method should be called if a notification fails.
public  booleanisReverseMappingEnabled()
    
protected  voidnotifyClassLoadListeners(Class newClass)
     Notify all registered class load listeners that the class newClass has just been loaded and prepared.
public  voidonClassLoad(Class cls)
    
public  voidonConstructor(ConstructorJoinPoint joinPoint)
     Hook method to be called whenever a registered constructor is invoked.
public  voidonExceptionCatch(ExceptionCatchJoinPoint joinPoint)
     Hook method to be called whenever an Exception Catch event is reported from the jvmai-interface.
public  voidonExceptionThrow(ExceptionJoinPoint joinPoint)
     Hook method to be called whenever an Exception event is reported from the jvmai-interface.
public  voidonFieldAccess(FieldAccessJoinPoint joinPoint)
    
public  voidonFieldModification(FieldModificationJoinPoint joinPoint)
    
public  voidonMethodEntry(MethodEntryJoinPoint joinPoint)
    
public  voidonMethodExit(MethodExitJoinPoint joinPoint)
    
public  voidregisterListener(JoinPointListener list, JoinPointRequest req)
     Register the listener lsnr for events requested by jpr.
public  voidregisterListener(ClassLoadListener updateGuy)
     Register a class load listener event.
public  voidresumeListenerNotification(Thread t)
     Resume the notification of listerners interested in join-points that occur in the specified thread.
public  voidsuspendListenerNotification(Thread t)
     Suspend notification of all listeners interested in join-points that occur in the specified thread.
public  StringtoString()
     Return the state of the join-point manager.
public  voidunregisterListener(JoinPointListener listener)
     Deregister listener lsnr from this JoinPointManager. As a result of this action, the listener lsnr will cease being notified of any kind of events.
public  voidunregisterListener(ClassLoadListener updateGuy)
     Unregister a class load listener.

Field Detail
classLoadListeners
final protected Set classLoadListeners(Code)



enableRevMap
protected boolean enableRevMap(Code)



enabledJoinPoints
final protected HashSet enabledJoinPoints(Code)



isConnected
protected boolean isConnected(Code)



listener2req
final protected Map listener2req(Code)



req2listener
final protected Map req2listener(Code)




Constructor Detail
JoinPointManager
public JoinPointManager(boolean isConnected, JVMAspectInterface ai, boolean enableRevMap)(Code)
Create an JoinPointManagerImpl with no registered listeners or events.




Method Detail
allJoinpoints
public Set allJoinpoints()(Code)



connectToJVMAI
public void connectToJVMAI()(Code)



createJoinPointRequest
public JoinPointRequest createJoinPointRequest(String kind, Object o)(Code)



disconnectFromJVMAI
public void disconnectFromJVMAI()(Code)



getAspectInterface
public JVMAspectInterface getAspectInterface()(Code)



getCrosscuts
public Set getCrosscuts(JoinPointRequest jpr)(Code)



getJoinpoints
public Set getJoinpoints(Crosscut cc)(Code)



getLoadedClasses
public List getLoadedClasses()(Code)
Returns all currently loaded classes in the virtual machine.



handleExceptions
protected void handleExceptions(List exceptionList, JoinPoint crtEvent)(Code)
This method should be called if the notification fails for some of the listeners. Subclasses are encouraged to override this method in order to implement their own exception handling policy, e.g., removing the bad listeners from this JoinPointManager.
Parameters:
  exceptionList - a list of Exception objects, thrown during the notificationof listeners of crtEvent.
Parameters:
  crtEvent - a JoinPointEvent whose listeners were not properlynotified.



handleRuntimeException
protected Exception handleRuntimeException(Exception e)(Code)
This method should be called if a notification fails. If the notification fails with a Runtime exception, the default implementation of this method throws the corresponding run-time exception. Otherwise it returns the exception that caused the failure.
Parameters:
  e - the exception to be handled a non-runtime exception thrown by the advice



isReverseMappingEnabled
public boolean isReverseMappingEnabled()(Code)



notifyClassLoadListeners
protected void notifyClassLoadListeners(Class newClass)(Code)
Notify all registered class load listeners that the class newClass has just been loaded and prepared. This method should be invoked by implementations of this abstract immediately after a class of intereest (containing potential join-points) is loaded and prepared.
Parameters:
  newClass - the class that is new to the system



onClassLoad
public void onClassLoad(Class cls)(Code)



onConstructor
public void onConstructor(ConstructorJoinPoint joinPoint)(Code)
Hook method to be called whenever a registered constructor is invoked.



onExceptionCatch
public void onExceptionCatch(ExceptionCatchJoinPoint joinPoint)(Code)
Hook method to be called whenever an Exception Catch event is reported from the jvmai-interface. For every listener registered on an exception catch event it invoces the corresponding joinPointReached-method.



onExceptionThrow
public void onExceptionThrow(ExceptionJoinPoint joinPoint)(Code)
Hook method to be called whenever an Exception event is reported from the jvmai-interface. For every listener registered on an exception throw event it invoces the corresponding joinPointReached-method.



onFieldAccess
public void onFieldAccess(FieldAccessJoinPoint joinPoint)(Code)



onFieldModification
public void onFieldModification(FieldModificationJoinPoint joinPoint)(Code)



onMethodEntry
public void onMethodEntry(MethodEntryJoinPoint joinPoint)(Code)



onMethodExit
public void onMethodExit(MethodExitJoinPoint joinPoint)(Code)



registerListener
public void registerListener(JoinPointListener list, JoinPointRequest req)(Code)
Register the listener lsnr for events requested by jpr. If the request jpr is the first of its kind, the join corresponding join point will be enabled. More precise, if no other request with an equal singature has been previously registered, the join point will be enabled. This method checks for the permission ProsePermission "registerListener" to be present.



registerListener
public void registerListener(ClassLoadListener updateGuy)(Code)
Register a class load listener event. All class load listeners will be notified every time a class of interest (containing potential join-points) has been loaded.
Parameters:
  updateGuy - the listener of class load events



resumeListenerNotification
public void resumeListenerNotification(Thread t)(Code)
Resume the notification of listerners interested in join-points that occur in the specified thread.



suspendListenerNotification
public void suspendListenerNotification(Thread t)(Code)
Suspend notification of all listeners interested in join-points that occur in the specified thread. This method is idempotent. Successive calls to this method with the same argument have the same effect as calling it only once.



toString
public String toString()(Code)
Return the state of the join-point manager. The registeresd listeners and the associated requests will be returned.



unregisterListener
public void unregisterListener(JoinPointListener listener)(Code)
Deregister listener lsnr from this JoinPointManager. As a result of this action, the listener lsnr will cease being notified of any kind of events. Upon this action, any 'lonely event' -- one for whom no listener exists will be disabled. More precisely, if lsnr was the last listener litening on envents with the signature S, S.disableJoinPoint will be performed.



unregisterListener
public void unregisterListener(ClassLoadListener updateGuy)(Code)
Unregister a class load listener.
Parameters:
  updateGuy - the listener to be removed from the listeners list.



Methods inherited from ch.ethz.jvmai.JoinPointHook
abstract public void onClassLoad(Class cls)(Code)(Java Doc)
abstract public void onConstructor(ConstructorJoinPoint joinPoint)(Code)(Java Doc)
abstract public void onExceptionCatch(ExceptionCatchJoinPoint joinPoint)(Code)(Java Doc)
abstract public void onExceptionThrow(ExceptionJoinPoint joinPoint)(Code)(Java Doc)
abstract public void onFieldAccess(FieldAccessJoinPoint joinPoint)(Code)(Java Doc)
abstract public void onFieldModification(FieldModificationJoinPoint joinPoint)(Code)(Java Doc)
abstract public void onMethodEntry(MethodEntryJoinPoint joinPoint)(Code)(Java Doc)
abstract public void onMethodExit(MethodExitJoinPoint joinPoint)(Code)(Java Doc)

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.