KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Mock version of a method invocation event object.
10  */

11 public class MockMethodInvocationEvent implements MethodInvocationEvent {
12
13   private Method JavaDoc method;
14   private Object JavaDoc[] arguments;
15   private long executionStartTime;
16   private long executionEndTime;
17   private Throwable JavaDoc exception;
18   private Object JavaDoc returnValue;
19   private Object JavaDoc invokedObject;
20
21   public Method JavaDoc getMethod() {
22     return method;
23   }
24
25   public Object JavaDoc[] getArguments() {
26     return arguments;
27   }
28
29   public long getExecutionStartTime() {
30     return executionStartTime;
31   }
32
33   public long getExecutionEndTime() {
34     return executionEndTime;
35   }
36
37   public Throwable JavaDoc getException() {
38     return exception;
39   }
40
41   public Object JavaDoc getReturnValue() {
42     return returnValue;
43   }
44
45   public Object JavaDoc getInvokedObject() {
46     return invokedObject;
47   }
48
49   public void setArguments(Object JavaDoc[] arguments) {
50     this.arguments = arguments;
51   }
52
53   public void setException(Throwable JavaDoc exception) {
54     this.exception = exception;
55   }
56
57   public void setExecutionEndTime(long executionEndTime) {
58     this.executionEndTime = executionEndTime;
59   }
60
61   public void setExecutionStartTime(long executionStartTime) {
62     this.executionStartTime = executionStartTime;
63   }
64
65   public void setInvokedObject(Object JavaDoc invokedObject) {
66     this.invokedObject = invokedObject;
67   }
68
69   public void setMethod(Method JavaDoc method) {
70     this.method = method;
71   }
72
73   public void setReturnValue(Object JavaDoc returnValue) {
74     this.returnValue = returnValue;
75   }
76 }
Popular Tags