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.object.appevent;
05:
06: import com.tc.util.NonPortableReason;
07:
08: /**
09: * Event context for a non-portable event on a logical invoke.
10: */
11: public class NonPortableLogicalInvokeContext extends
12: NonPortableEventContext {
13:
14: private static final long serialVersionUID = -7205127466022191118L;
15:
16: private final String logicalMethod;
17: private transient final Object[] params;
18: private final int paramIndex;
19:
20: public NonPortableLogicalInvokeContext(Object pojo,
21: String threadName, String clientId, String logicalMethod,
22: Object[] params, int index) {
23: super (pojo, threadName, clientId);
24: this .logicalMethod = logicalMethod;
25: this .params = params;
26: this .paramIndex = index;
27: }
28:
29: /**
30: * @return Get logical method being called
31: */
32: public String getLogicalMethod() {
33: return logicalMethod;
34: }
35:
36: /**
37: * @return Get parameters being passed on method call
38: */
39: public Object[] getParameters() {
40: return params;
41: }
42:
43: /**
44: * @return Get parameter index that was non-portable
45: */
46: public int getParameterIndex() {
47: return paramIndex;
48: }
49:
50: public void addDetailsTo(NonPortableReason reason) {
51: super .addDetailsTo(reason);
52: reason.addDetail("Logically-managed class name",
53: getTargetClassName());
54: reason.addDetail("Logical method name", logicalMethod);
55: }
56:
57: }
|