Java Doc for Advised.java in  » J2EE » spring-framework-2.0.6 » org » springframework » aop » framework » 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 » J2EE » spring framework 2.0.6 » org.springframework.aop.framework 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.aop.framework.Advised

All known Subclasses:   org.springframework.aop.framework.AdvisedSupport,
Advised
public interface Advised extends TargetClassAware(Code)
Interface to be implemented by classes that hold the configuration of a factory of AOP proxies. This configuration includes the Interceptors and other advice, and Advisors, and the proxied interfaces.

Any AOP proxy obtained from Spring can be cast to this interface to allow manipulation of its AOP advice.
author:
   Rod Johnson
author:
   Juergen Hoeller
since:
   13.03.2003
See Also:   org.springframework.aop.framework.AdvisedSupport





Method Summary
 voidaddAdvice(Advice advice)
     Add the given AOP Alliance advice to the tail of the advice (interceptor) chain.
 voidaddAdvice(int pos, Advice advice)
     Add the given AOP Alliance Advice at the specified position in the advice chain.
 voidaddAdvisor(Advisor advisor)
     Add an advisor at the end of the advisor chain.
 voidaddAdvisor(int pos, Advisor advisor)
     Add an Advisor at the specified position in the chain.
Parameters:
  advisor - the advisor to add at the specified position in the chain
Parameters:
  pos - position in chain (0 is head).
 Advisor[]getAdvisors()
     Return the advisors applying to this proxy.
 Class[]getProxiedInterfaces()
     Return the interfaces proxied by the AOP proxy.
 TargetSourcegetTargetSource()
     Return the TargetSource used by this Advised object.
 intindexOf(Advisor advisor)
     Return the index (from 0) of the given advisor, or -1 if no such advisor applies to this proxy.
 intindexOf(Advice advice)
     Return the index (from 0) of the given AOP Alliance Advice, or -1 if no such advice is an advice for this proxy.
 booleanisExposeProxy()
     Return whether the factory should expose the proxy as a ThreadLocal. This can be necessary if a target object needs to invoke a method on itself benefitting from advice.
 booleanisFrozen()
     Return whether the Advised configuration is frozen, in which case no advice changes can be made.
 booleanisInterfaceProxied(Class intf)
     Determine whether the given interface is proxied.
 booleanisProxyTargetClass()
    
 booleanremoveAdvice(Advice advice)
     Remove the Advisor containing the given advice.
 booleanremoveAdvisor(Advisor advisor)
     Remove the given advisor.
 voidremoveAdvisor(int index)
     Remove the advisor at the given index.
 booleanreplaceAdvisor(Advisor a, Advisor b)
     Replace the given advisor.

Note: If the advisor is an org.springframework.aop.IntroductionAdvisor and the replacement is not or implements different interfaces, the proxy will need to be re-obtained or the old interfaces won't be supported and the new interface won't be implemented.
Parameters:
  a - the advisor to replace
Parameters:
  b - the advisor to replace it with whether it was replaced.

 voidsetExposeProxy(boolean exposeProxy)
     Set whether the proxy should be exposed by the AOP framework as a ThreadLocal for retrieval via the AopContext class.
 voidsetTargetSource(TargetSource targetSource)
     Change the TargetSource used by this Advised object.
 StringtoProxyConfigString()
     As toString() will normally be delegated to the target, this returns the equivalent for the AOP proxy.



Method Detail
addAdvice
void addAdvice(Advice advice) throws AopConfigException(Code)
Add the given AOP Alliance advice to the tail of the advice (interceptor) chain.

This will be wrapped in a DefaultPointcutAdvisor with a pointcut that always applies, and returned from the getAdvisors() method in this wrapped form.

Note that the given advice will apply to all invocations on the proxy, even to the toString() method! Use appropriate advice implementations or specify appropriate pointcuts to apply to a narrower set of methods.
Parameters:
  advice - advice to add to the tail of the chain
throws:
  AopConfigException - in case of invalid advice
See Also:   Advised.addAdvice(int,Advice)
See Also:   org.springframework.aop.support.DefaultPointcutAdvisor




addAdvice
void addAdvice(int pos, Advice advice) throws AopConfigException(Code)
Add the given AOP Alliance Advice at the specified position in the advice chain.

This will be wrapped in a org.springframework.aop.support.DefaultPointcutAdvisor with a pointcut that always applies, and returned from the Advised.getAdvisors() method in this wrapped form.

Note: The given advice will apply to all invocations on the proxy, even to the toString() method! Use appropriate advice implementations or specify appropriate pointcuts to apply to a narrower set of methods.
Parameters:
  pos - index from 0 (head)
Parameters:
  advice - advice to add at the specified position in the advice chain
throws:
  AopConfigException - in case of invalid advice




addAdvisor
void addAdvisor(Advisor advisor) throws AopConfigException(Code)
Add an advisor at the end of the advisor chain.

The Advisor may be an org.springframework.aop.IntroductionAdvisor , in which new interfaces will be available when a proxy is next obtained from the relevant factory.
Parameters:
  advisor - the advisor to add to the end of the chain
throws:
  AopConfigException - in case of invalid advice




addAdvisor
void addAdvisor(int pos, Advisor advisor) throws AopConfigException(Code)
Add an Advisor at the specified position in the chain.
Parameters:
  advisor - the advisor to add at the specified position in the chain
Parameters:
  pos - position in chain (0 is head). Must be valid.
throws:
  AopConfigException - in case of invalid advice



getAdvisors
Advisor[] getAdvisors()(Code)
Return the advisors applying to this proxy. a list of Advisors applying to this proxy (never null)



getProxiedInterfaces
Class[] getProxiedInterfaces()(Code)
Return the interfaces proxied by the AOP proxy. Will not include the target class, which may also be proxied.



getTargetSource
TargetSource getTargetSource()(Code)
Return the TargetSource used by this Advised object.



indexOf
int indexOf(Advisor advisor)(Code)
Return the index (from 0) of the given advisor, or -1 if no such advisor applies to this proxy.

The return value of this method can be used to index into the advisors array.
Parameters:
  advisor - the advisor to search for index from 0 of this advisor, or -1 if there's no such advisor




indexOf
int indexOf(Advice advice)(Code)
Return the index (from 0) of the given AOP Alliance Advice, or -1 if no such advice is an advice for this proxy.

The return value of this method can be used to index into the advisors array.
Parameters:
  advice - AOP Alliance advice to search for index from 0 of this advice, or -1 if there's no such advice




isExposeProxy
boolean isExposeProxy()(Code)
Return whether the factory should expose the proxy as a ThreadLocal. This can be necessary if a target object needs to invoke a method on itself benefitting from advice. (If it invokes a method on this no advice will apply.) Getting the proxy is analogous to an EJB calling getEJBObject().
See Also:   AopContext



isFrozen
boolean isFrozen()(Code)
Return whether the Advised configuration is frozen, in which case no advice changes can be made.



isInterfaceProxied
boolean isInterfaceProxied(Class intf)(Code)
Determine whether the given interface is proxied.
Parameters:
  intf - the interface to check



isProxyTargetClass
boolean isProxyTargetClass()(Code)
Are we proxying the full target class instead of specified interfaces?



removeAdvice
boolean removeAdvice(Advice advice)(Code)
Remove the Advisor containing the given advice.
Parameters:
  advice - the advice to remove true of the advice was found and removed;false if there was no such advice



removeAdvisor
boolean removeAdvisor(Advisor advisor)(Code)
Remove the given advisor.
Parameters:
  advisor - the advisor to remove true if the advisor was removed; falseif the advisor was not found and hence could not be removed



removeAdvisor
void removeAdvisor(int index) throws AopConfigException(Code)
Remove the advisor at the given index.
Parameters:
  index - index of advisor to remove
throws:
  AopConfigException - if the index is invalid



replaceAdvisor
boolean replaceAdvisor(Advisor a, Advisor b) throws AopConfigException(Code)
Replace the given advisor.

Note: If the advisor is an org.springframework.aop.IntroductionAdvisor and the replacement is not or implements different interfaces, the proxy will need to be re-obtained or the old interfaces won't be supported and the new interface won't be implemented.
Parameters:
  a - the advisor to replace
Parameters:
  b - the advisor to replace it with whether it was replaced. If the advisor wasn't found in thelist of advisors, this method returns false and does nothing.
throws:
  AopConfigException - in case of invalid advice




setExposeProxy
void setExposeProxy(boolean exposeProxy)(Code)
Set whether the proxy should be exposed by the AOP framework as a ThreadLocal for retrieval via the AopContext class. This is useful if an advised object needs to call another advised method on itself. (If it uses this, the invocation will not be advised).

Default is "false", for optimal performance.




setTargetSource
void setTargetSource(TargetSource targetSource)(Code)
Change the TargetSource used by this Advised object. Only works if the configuration isn't frozen.
Parameters:
  targetSource - new TargetSource to use



toProxyConfigString
String toProxyConfigString()(Code)
As toString() will normally be delegated to the target, this returns the equivalent for the AOP proxy. a string description of the proxy configuration



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