Last active
August 29, 2015 14:12
-
-
Save abhirockzz/770b27cd172813367fce to your computer and use it in GitHub Desktop.
Lifecycle Callback interceptors @AroundConstruct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConstructorInterceptor{ | |
@AroundConstruct | |
public Object interceptorMethod(InvocationContext ictx) throws Exception{ | |
//logic goes here | |
} | |
} | |
public class APOJO{ | |
@Interceptors(ConstructorInterceptor.class) | |
public APOJO(){ | |
//any calls to this constructor will be intercepted by ConstructorInterceptor.interceptorMethod() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment