KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tcclient > object > DistributedMethodCall


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

5 package com.tcclient.object;
6
7 /**
8  * Representation of a distributed method call
9  */

10 public class DistributedMethodCall {
11   private final Object JavaDoc receiver;
12   private final Object JavaDoc[] parameters;
13   private final String JavaDoc methodName;
14   private final String JavaDoc paramDesc;
15
16   public DistributedMethodCall(final Object JavaDoc receiver, final Object JavaDoc[] parameters, final String JavaDoc methodName,
17                                final String JavaDoc paramDesc) {
18     this.receiver = receiver;
19     this.parameters = parameters;
20     this.methodName = methodName;
21     this.paramDesc = paramDesc;
22   }
23
24   public Object JavaDoc getReceiver() {
25     return receiver;
26   }
27
28   public String JavaDoc getMethodName() {
29     return this.methodName;
30   }
31
32   public String JavaDoc getParameterDesc() {
33     return paramDesc;
34   }
35
36   public final Object JavaDoc[] getParameters() {
37     Object JavaDoc[] rv = new Object JavaDoc[parameters.length];
38     for (int i = 0; i < parameters.length; i++)
39       rv[i] = parameters[i];
40     return rv;
41   }
42
43   public String JavaDoc toString() {
44     return receiver.getClass().getName() + "." + methodName + paramDesc;
45   }
46 }
47
Popular Tags