01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.common.proxy;
05:
06: import java.lang.reflect.Method;
07:
08: /**
09: * A simple implementation of the MethodInvocationEvent interface (heck, I have to write something here)
10: */
11: class MethodInvocationEventImpl implements MethodInvocationEvent {
12: private final long executionStartTime;
13: private final long executionEndTime;
14: private final Method method;
15: private final Object[] args;
16: private final Throwable exception;
17: private final Object returnValue;
18: private final Object invokedObject;
19:
20: public MethodInvocationEventImpl(long executionStart,
21: long executionEnd, Object invokedObj, Method method,
22: Object[] args, Throwable exception, Object returnValue) {
23: this .executionStartTime = executionStart;
24: this .executionEndTime = executionEnd;
25: this .method = method;
26: this .args = args;
27: this .exception = exception;
28: this .returnValue = returnValue;
29: this .invokedObject = invokedObj;
30: }
31:
32: public Method getMethod() {
33: return method;
34: }
35:
36: public Object[] getArguments() {
37: return args;
38: }
39:
40: public long getExecutionStartTime() {
41: return executionStartTime;
42: }
43:
44: public long getExecutionEndTime() {
45: return executionEndTime;
46: }
47:
48: public Throwable getException() {
49: return exception;
50: }
51:
52: public Object getReturnValue() {
53: return returnValue;
54: }
55:
56: public Object getInvokedObject() {
57: return invokedObject;
58: }
59: }
|