01: package org.jgroups.jmx.protocols;
02:
03: import org.jgroups.jmx.Protocol;
04:
05: import java.util.Vector;
06:
07: /**
08: * @author Bela Ban
09: * @version $Id: Discovery.java,v 1.4 2005/08/26 14:19:09 belaban Exp $
10: */
11: public class Discovery extends Protocol implements DiscoveryMBean {
12: org.jgroups.protocols.Discovery p;
13:
14: public Discovery() {
15: }
16:
17: public Discovery(org.jgroups.stack.Protocol p) {
18: super (p);
19: this .p = (org.jgroups.protocols.Discovery) p;
20: }
21:
22: public void attachProtocol(org.jgroups.stack.Protocol p) {
23: super .attachProtocol(p);
24: this .p = (org.jgroups.protocols.Discovery) p;
25: }
26:
27: public long getTimeout() {
28: return p.getTimeout();
29: }
30:
31: public void setTimeout(long timeout) {
32: p.setTimeout(timeout);
33: }
34:
35: public int getInitialMembers() {
36: return p.getNumInitialMembers();
37: }
38:
39: public void setInitialMembers(int num_initial_members) {
40: p.setNumInitialMembers(num_initial_members);
41: }
42:
43: public int getPingRequests() {
44: return p.getNumPingRequests();
45: }
46:
47: public void setPingRequests(int num_ping_requests) {
48: p.setNumPingRequests(num_ping_requests);
49: }
50:
51: public int getDiscoveryRequestsSent() {
52: return p.getNumberOfDiscoveryRequestsSent();
53: }
54:
55: public Vector findInitialMembers() {
56: return p.findInitialMembers();
57: }
58:
59: public String findInitialMembersAsString() {
60: return p.findInitialMembersAsString();
61: }
62: }
|