KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > jmx > protocols > SEQUENCER


1 package org.jgroups.jmx.protocols;
2
3 import org.jgroups.jmx.Protocol;
4
5 import java.util.Map JavaDoc;
6
7 /**
8  * @author Bela Ban
9  * @version $Id: SEQUENCER.java,v 1.1 2006/01/03 14:43:43 belaban Exp $
10  */

11 public class SEQUENCER extends Protocol implements SEQUENCERMBean {
12     org.jgroups.protocols.SEQUENCER p;
13
14     public SEQUENCER() {
15     }
16
17     public SEQUENCER(org.jgroups.stack.Protocol p) {
18         super(p);
19         this.p=(org.jgroups.protocols.SEQUENCER)p;
20     }
21
22     public void attachProtocol(org.jgroups.stack.Protocol p) {
23         super.attachProtocol(p);
24         this.p=(org.jgroups.protocols.SEQUENCER)p;
25     }
26
27     public boolean isCoord() {
28         return p.isCoordinator();
29     }
30
31     public String JavaDoc getCoordinator() {
32         return p.getCoordinator().toString();
33     }
34
35     public String JavaDoc getLocalAddress() {
36         return p.getLocalAddress().toString();
37     }
38
39     public long getForwarded() {
40         return p.getForwarded();
41     }
42
43     public long getBroadcast() {
44         return p.getBroadcast();
45     }
46
47     public long getReceivedForwards() {
48         return p.getReceivedForwards();
49     }
50
51     public long getReceivedBroadcasts() {
52         return p.getReceivedBroadcasts();
53     }
54
55     public void resetStats() {
56         super.resetStats();
57     }
58
59     public String JavaDoc printStats() {
60         return super.printStats();
61     }
62
63     public Map JavaDoc dumpStats() {
64         return super.dumpStats();
65     }
66 }
67
Popular Tags