public class MonitoringProxy extends Object implements InvocationHandler, Serializable
facade = MonitoringProxy.createProxy(facade);| Modifier | Constructor and Description |
|---|---|
protected |
MonitoringProxy(Object facade)
Constructeur privé : instanciation pour méthode createProxy ci-dessous.
|
protected |
MonitoringProxy(Object facade,
String name)
Constructeur privé : instanciation pour méthode createProxy ci-dessous.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
createProxy(T facade)
Création d'un proxy de monitoring pour une façade.
|
protected static <T> T |
createProxy(T facade,
MonitoringProxy monitoringProxy) |
static <T> T |
createProxy(T facade,
String name)
Création d'un proxy de monitoring pour une façade, en spécifiant le nom qui sera affiché dans le monitoring.
|
protected String |
getName() |
protected String |
getRequestName(Method method) |
Object |
invoke(Object proxy,
Method method,
Object[] args)
Intercepte une exécution de méthode sur une façade.
|
static Object |
invokeTarget(Object target,
Method method,
Object[] args,
String requestName)
Invoke target.
|
protected MonitoringProxy(Object facade)
facade - Objectpublic static <T> T createProxy(T facade)
T - Type de la façade (une interface en général).facade - Instance de la façadepublic static <T> T createProxy(T facade,
String name)
T - Type de la façade (une interface en général).facade - Instance de la façadename - override of the interface name in the statisticspublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerproxy - Objectmethod - Methodargs - Object[]Throwable - tpublic static Object invokeTarget(Object target, Method method, Object[] args, String requestName) throws IllegalAccessException, InvocationTargetException
target - Instance to callmethod - Method to callargs - Method argumentsrequestName - Request name to displayIllegalAccessException - eInvocationTargetException - eprotected String getName()
protected static <T> T createProxy(T facade,
MonitoringProxy monitoringProxy)
Copyright © 2008–2021 Emeric Vernat. All rights reserved.