1 3 package org.jgroups; 4 5 import org.w3c.dom.Element ; 6 7 import java.io.File ; 8 9 import java.net.URL ; 10 11 import org.jgroups.conf.ConfiguratorFactory; 12 import org.jgroups.conf.ProtocolStackConfigurator; 13 14 18 public class JChannelFactory implements ChannelFactory { 19 private ProtocolStackConfigurator _configuration; 20 21 29 public JChannelFactory() { 30 } 31 32 42 public JChannelFactory(File properties) throws ChannelException { 43 _configuration=ConfiguratorFactory.getStackConfigurator(properties); 44 } 45 46 56 public JChannelFactory(Element properties) throws ChannelException { 57 _configuration =ConfiguratorFactory.getStackConfigurator(properties); 58 } 59 60 70 public JChannelFactory(URL properties) throws ChannelException { 71 _configuration=ConfiguratorFactory.getStackConfigurator(properties); 72 } 73 74 87 public JChannelFactory(String properties) throws ChannelException { 88 _configuration=ConfiguratorFactory.getStackConfigurator(properties); 89 } 90 91 108 public Channel createChannel(Object properties) throws ChannelException { 109 return new JChannel(properties); 110 } 111 112 119 public Channel createChannel() throws ChannelException { 120 return new JChannel(_configuration); 121 } 122 } 123 | Popular Tags |