1 package org.jgroups.jmx; 2 3 4 import java.util.Properties ; 5 import java.util.Map ; 6 7 11 public class Protocol implements ProtocolMBean { 12 org.jgroups.stack.Protocol prot; 13 14 public Protocol() { 15 16 } 17 18 public Protocol(org.jgroups.stack.Protocol p) { 19 this.prot=p; 20 } 21 22 public String getName() { 23 return prot.getName(); 24 } 25 26 public void attachProtocol(org.jgroups.stack.Protocol p) { 27 this.prot=p; 28 } 29 30 public String getPropertiesAsString() { 31 return prot.getProperties().toString(); 32 } 33 34 public void setProperties(Properties p) { 35 prot.setProperties(p); 36 } 37 38 39 public boolean getStatsEnabled() { 40 return prot.statsEnabled(); 41 } 42 43 public void setStatsEnabled(boolean flag) { 44 prot.enableStats(flag); 45 } 46 47 public void resetStats() { 48 prot.resetStats(); 49 } 50 51 public String printStats() { 52 return prot.printStats(); 53 } 54 55 public Map dumpStats() { 56 return prot.dumpStats(); 57 } 58 59 public void create() throws Exception { 60 prot.init(); 61 } 62 63 public void start() throws Exception { 64 prot.start(); 65 } 66 67 public void stop() { 68 prot.stop(); 69 } 70 71 public void destroy() { 72 prot.destroy(); 73 } 74 } 75 | Popular Tags |