The components of AOP are advices/interceptors, introductions, metadata, and pointcuts. Explain themAdvice: Action taken by the AOP framework at a particular joinpoint. Different types of advice include "around," "before" and "throws" advice. Many AOP frameworks model an advice as an interceptor, maintaining a chain of interceptors "around" the joinpoint. Pointcut: A set of joinpoints specifying when an advice should fire. An AOP framework must allow developers to specify pointcuts. Introduction: Adding methods or fields to an advised class.The components of AOP are advices/interceptors, introductions, metadata, and pointcuts. Explain themAdvice / Interceptor: An object that intercept the invocation of a method before its execution. Interceptor embodies the behavior to add or remove or replace the functionality of infrastructure. Perfect pluggability without changes need for business logic is provided by Interceptor.
Introductions: Introductions adds states and functionality to the existisng objects.
Pointcuts: Pointcuts allows to define the loction of interceptors and introductions are to applied.
Metadata: Metadata provide information about class and runtime system hints for treating the classes. For example, AOP logging , monitoring of the code without instrumenting with the code.
|