private static ProtocolStackConfigurator loadUdp() {
   try {
     return ConfiguratorFactory.getStackConfigurator("stacks/udp.xml");
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }
Beispiel #2
0
 /**
  * Creates a JChannel without a protocol stack; used for programmatic creation of channel and
  * protocol stack
  *
  * @param create_protocol_stack If true, the default configuration will be used. If false, no
  *     protocol stack will be created
  */
 public JChannel(boolean create_protocol_stack) {
   if (create_protocol_stack) {
     try {
       init(ConfiguratorFactory.getStackConfigurator(DEFAULT_PROTOCOL_STACK));
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
 }
Beispiel #3
0
 /**
  * Constructs a JChannel instance with the protocol stack configuration based upon the specified
  * properties parameter.
  *
  * @param props A file containing a JGroups XML configuration, a URL pointing to an XML
  *     configuration, or an old style plain configuration string.
  * @throws Exception If problems occur during the configuration or initialization of the protocol
  *     stack.
  */
 public JChannel(String props) throws Exception {
   this(ConfiguratorFactory.getStackConfigurator(props));
 }
Beispiel #4
0
 /**
  * Creates a channel with a configuration based on an input stream.
  *
  * @param input An input stream, pointing to a streamed configuration
  * @throws Exception
  */
 public JChannel(InputStream input) throws Exception {
   this(ConfiguratorFactory.getStackConfigurator(input));
 }
Beispiel #5
0
 /**
  * Constructs a JChannel instance with the protocol stack configuration indicated by the specified
  * URL.
  *
  * @param properties A URL pointing to a JGroups XML protocol stack configuration.
  * @throws Exception If problems occur during the configuration or initialization of the protocol
  *     stack.
  */
 public JChannel(URL properties) throws Exception {
   this(ConfiguratorFactory.getStackConfigurator(properties));
 }