1 package org.jgroups.jmx; 2 3 import org.jgroups.Channel; 4 5 import javax.management.MBeanServer ; 6 7 11 public class JChannelFactory implements JChannelFactoryMBean { 12 org.jgroups.JChannelFactory factory=new org.jgroups.JChannelFactory(); 13 14 15 public JChannelFactory(org.jgroups.JChannelFactory factory) { 16 this.factory=factory; 17 } 18 19 public JChannelFactory() { 20 } 21 22 public void setMultiplexerConfig(String properties) throws Exception { 23 factory.setMultiplexerConfig(properties); 24 } 25 26 public String getMultiplexerConfig() { 27 return factory.getMultiplexerConfig(); 28 } 29 30 public String getDomain() { 31 return factory.getDomain(); 32 } 33 34 public void setDomain(String name) { 35 factory.setDomain(name); 36 } 37 38 public boolean isExposeChannels() { 39 return factory.isExposeChannels(); 40 } 41 42 public void setExposeChannels(boolean flag) { 43 factory.setExposeChannels(flag); 44 } 45 46 public boolean isExposeProtocols() { 47 return factory.isExposeProtocols(); 48 } 49 50 public void setExposeProtocols(boolean f) { 51 factory.setExposeProtocols(f); 52 } 53 54 55 public Channel createMultiplexerChannel(String stack_name, String id) throws Exception { 56 return factory.createMultiplexerChannel(stack_name, id); 57 } 58 59 public Channel createMultiplexerChannel(String stack_name, String id, boolean register_for_state_transfer, String substate_id) throws Exception { 60 return factory.createMultiplexerChannel(stack_name, id, register_for_state_transfer, substate_id); 61 } 62 63 public void create() throws Exception { 64 if(factory == null) 65 factory=new org.jgroups.JChannelFactory(); 66 factory.create(); 67 } 68 69 public void start() throws Exception { 70 factory.start(); 71 } 72 73 public void stop() { 74 factory.stop(); 75 } 76 77 public void destroy() { 78 factory.destroy(); 79 factory=null; 80 } 81 82 public String dumpConfiguration() { 83 return factory.dumpConfiguration(); 84 } 85 86 public String dumpChannels() { 87 return factory.dumpChannels(); 88 } 89 } 90 | Popular Tags |