1
14
15 package com.liferay.portal.monitoring.statistics.service;
16
17 import com.liferay.portal.kernel.util.MethodKey;
18 import com.liferay.portal.monitoring.MonitorNames;
19 import com.liferay.portal.monitoring.statistics.BaseDataSample;
20
21 import java.lang.reflect.Method;
22
23 import org.aopalliance.intercept.MethodInvocation;
24
25
30 public class ServiceRequestDataSample extends BaseDataSample {
31
32 public ServiceRequestDataSample(MethodInvocation methodInvocation) {
33 setNamespace(MonitorNames.SERVICE);
34
35 Method method = methodInvocation.getMethod();
36
37 String className = method.getDeclaringClass().getName();
38 String methodName = method.getName();
39 Class<?>[] parameterTypes = method.getParameterTypes();
40
41 _methodKey = new MethodKey(className, methodName, parameterTypes);
42
43 setDescription(_methodKey.toString());
44 }
45
46 public MethodKey getMethodKey() {
47 return _methodKey;
48 }
49
50 private MethodKey _methodKey;
51
52 }