01: // $Id: RpcProtocolEXAMPLE.java,v 1.2 2004/03/30 06:47:21 belaban Exp $
02:
03: package org.jgroups.protocols;
04:
05: import org.jgroups.Event;
06: import org.jgroups.stack.RpcProtocol;
07:
08: /**
09:
10: */
11: public class RpcProtocolEXAMPLE extends RpcProtocol {
12:
13: public String getName() {
14: return "RpcProtocolEXAMPLE";
15: }
16:
17: /* ------------------------- Request handler methods ----------------------------- */
18:
19: // Your methods, e.g.
20: public void foo() {
21: }
22:
23: public Object bar(int a, int b) {
24: return null;
25: }
26:
27: /* --------------------- End of Request handler methods -------------------------- */
28:
29: /**
30: <b>Callback</b>. Called by superclass when event may be handled.<p>
31: <b>Do not use <code>PassUp</code> in this method as the event is passed up
32: by default by the superclass after this method returns !</b>
33: @return boolean Defaults to true. If false, event will not be passed up the stack.
34: */
35: public boolean handleUpEvent(Event evt) {
36: return true;
37: }
38:
39: /**
40: <b>Callback</b>. Called by superclass when event may be handled.<p>
41: <b>Do not use <code>PassDown</code> in this method as the event is passed down
42: by default by the superclass after this method returns !</b>
43: @return boolean Defaults to true. If false, event will not be passed down the stack.
44: */
45: public boolean handleDownEvent(Event evt) {
46: return true;
47: }
48:
49: }
|