KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > common > proxy > MethodInvocationEventImpl


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.common.proxy;
5
6 import java.lang.reflect.Method JavaDoc;
7
8 /**
9  * 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 JavaDoc method;
15   private final Object JavaDoc[] args;
16   private final Throwable JavaDoc exception;
17   private final Object JavaDoc returnValue;
18   private final Object JavaDoc invokedObject;
19   
20   public MethodInvocationEventImpl(long executionStart, long executionEnd, Object JavaDoc invokedObj, Method JavaDoc method, Object JavaDoc[] args, Throwable JavaDoc exception, Object JavaDoc returnValue) {
21     this.executionStartTime = executionStart;
22     this.executionEndTime = executionEnd;
23     this.method = method;
24     this.args = args;
25     this.exception = exception;
26     this.returnValue = returnValue;
27     this.invokedObject = invokedObj;
28   }
29
30   public Method JavaDoc getMethod() {
31     return method;
32   }
33
34   public Object JavaDoc[] getArguments() {
35     return args;
36   }
37
38   public long getExecutionStartTime() {
39     return executionStartTime;
40   }
41
42   public long getExecutionEndTime() {
43     return executionEndTime;
44   }
45
46   public Throwable JavaDoc getException() {
47     return exception;
48   }
49
50   public Object JavaDoc getReturnValue() {
51     return returnValue;
52   }
53
54   public Object JavaDoc getInvokedObject() {
55     return invokedObject;
56   }
57 }
Popular Tags