KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > rmi > server > invocation > ServerPostInvokeEvent


1 package org.sapia.ubik.rmi.server.invocation;
2
3 import org.sapia.ubik.rmi.interceptor.Event;
4
5
6 /**
7  * An event signaling the completion of a remote method invocation,
8  * on the server-side.
9  *
10  * @author Yanick
11  * <dl>
12  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
13  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
14  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
15  * </dl>
16  */

17 public class ServerPostInvokeEvent implements Event {
18   private long _invokeDelay;
19   private InvokeCommand _cmd;
20   private Object JavaDoc _target;
21
22   /**
23    * Creates an instance of this class with the given parameters.
24    *
25    * @param target the object on which a remote method invocation was performed.
26    * @param cmd the command representing the method invocation.
27    * @param invokeDelay the time taken by the invocation (in millis).
28    */

29   ServerPostInvokeEvent(Object JavaDoc target, InvokeCommand cmd, long invokeDelay) {
30     _invokeDelay = invokeDelay;
31     _cmd = cmd;
32     _target = target;
33   }
34
35   /**
36    * Returns the command representing the invocation that was made.
37    *
38    * @return an <code>InvokeCommand</code>.
39    */

40   public InvokeCommand getInvokeCommand() {
41     return _cmd;
42   }
43
44   /**
45    * Returns the object on which the method invocation was performed.
46    *
47    * @return an <code>Object</code>.
48    */

49   public Object JavaDoc getTarget() {
50     return _target;
51   }
52
53   /**
54    * Returns the approximate amount of time the call has taken
55    * locally.
56    *
57    * @return a delay in milliseconds.
58    */

59   public long getInvokeDelay() {
60     return _invokeDelay;
61   }
62 }
63
Popular Tags