KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > protocols > RpcProtocolEXAMPLE


1 // $Id: RpcProtocolEXAMPLE.java,v 1.2 2004/03/30 06:47:21 belaban Exp $
2

3 package org.jgroups.protocols;
4
5
6
7 import org.jgroups.Event;
8 import org.jgroups.stack.RpcProtocol;
9
10
11
12 /**
13
14  */

15 public class RpcProtocolEXAMPLE extends RpcProtocol {
16
17     public String JavaDoc getName() {return "RpcProtocolEXAMPLE";}
18
19
20
21
22     /* ------------------------- Request handler methods ----------------------------- */
23
24
25     // Your methods, e.g.
26

27     public void foo() {}
28     public Object JavaDoc bar(int a, int b) {return null;}
29
30
31     /* --------------------- End of Request handler methods -------------------------- */
32
33
34
35
36     
37     /**
38        <b>Callback</b>. Called by superclass when event may be handled.<p>
39        <b>Do not use <code>PassUp</code> in this method as the event is passed up
40        by default by the superclass after this method returns !</b>
41        @return boolean Defaults to true. If false, event will not be passed up the stack.
42      */

43     public boolean handleUpEvent(Event evt) {return true;}
44
45
46     /**
47        <b>Callback</b>. Called by superclass when event may be handled.<p>
48        <b>Do not use <code>PassDown</code> in this method as the event is passed down
49        by default by the superclass after this method returns !</b>
50        @return boolean Defaults to true. If false, event will not be passed down the stack.
51     */

52     public boolean handleDownEvent(Event evt) {return true;}
53
54
55
56 }
57
Popular Tags