/** * Returns a protocol stack configurator based on the provided properties string. * @param properties a string representing a system resource containing a JGroups XML configuration, a URL pointing * to a JGroups XML configuration or a string representing a file name that contains a JGroups * XML configuration. */ public static ProtocolStackConfigurator getStackConfigurator(String properties) throws Exception { if(properties == null) properties=Global.DEFAULT_PROTOCOL_STACK; // Attempt to treat the properties string as a pointer to an XML configuration. XmlConfigurator configurator = null; checkForNullConfiguration(properties); configurator=getXmlConfigurator(properties); if(configurator != null) // did the properties string point to a JGroups XML configuration ? return configurator; throw new IllegalStateException(String.format("configuration %s not found or invalid", properties)); }
/** * Returns a protocol stack configurator based on the provided properties string. * @param properties a string representing a system resource containing a JGroups XML configuration, a URL pointing * to a JGroups XML configuration or a string representing a file name that contains a JGroups * XML configuration. */ public static ProtocolStackConfigurator getStackConfigurator(String properties) throws Exception { if(properties == null) properties=Global.DEFAULT_PROTOCOL_STACK; // Attempt to treat the properties string as a pointer to an XML configuration. XmlConfigurator configurator = null; checkForNullConfiguration(properties); configurator=getXmlConfigurator(properties); if(configurator != null) // did the properties string point to a JGroups XML configuration ? return configurator; throw new IllegalStateException(String.format("configuration %s not found or invalid", properties)); }
configurator=getXmlConfigurator(properties);