public static ProtocolStackConfigurator getStackConfigurator(InputStream input) throws Exception { return XmlConfigurator.getInstance(input); }
public static XmlConfigurator getInstance(URL url) throws java.io.IOException { return getInstance(url, null); }
public static XmlConfigurator getInstance(InputStream stream) throws java.io.IOException { return getInstance(stream, null); }
/** * Returns a protocol stack configurator based on the XML configuration provided by the specified XML element. * * @param element a XML element containing a JGroups XML configuration. * @return a {@code ProtocolStackConfigurator} containing the stack configuration. * @throws Exception if problems occur during the configuration of the protocol stack. */ public static ProtocolStackConfigurator getStackConfigurator(Element element) throws Exception { checkForNullConfiguration(element); return XmlConfigurator.getInstance(element); }
public static XmlConfigurator getInstance(URL url, Boolean validate) throws java.io.IOException { InputStream is = url.openStream(); try { return getInstance(is, validate); } finally { Util.close(is); } }
private static ProtocolStackConfigurator load(String resource) throws IllegalStateException { URL url = find(resource, JGroupsExtension.class.getClassLoader()); ROOT_LOGGER.debugf("Loading JGroups protocol defaults from %s", url.toString()); try { return XmlConfigurator.getInstance(url); } catch (IOException e) { throw new IllegalArgumentException(JGroupsLogger.ROOT_LOGGER.parserFailure(url)); } }
/** * Returns a protocol stack configurator based on the XML configuration provided at the specified URL. * * @param url a URL pointing to a JGroups XML configuration. * @return a {@code ProtocolStackConfigurator} containing the stack configuration. * @throws Exception if problems occur during the configuration of the protocol stack. */ public static ProtocolStackConfigurator getStackConfigurator(URL url) throws Exception { checkForNullConfiguration(url); checkJAXPAvailability(); return XmlConfigurator.getInstance(url); }
/** * Returns a protocol stack configurator based on the XML configuration provided by the specified File. * * @param file a File with a JGroups XML configuration. * @return a {@code ProtocolStackConfigurator} containing the stack configuration. * @throws Exception if problems occur during the configuration of the protocol stack. */ public static ProtocolStackConfigurator getStackConfigurator(File file) throws Exception { checkJAXPAvailability(); InputStream input=getConfigStream(file); return XmlConfigurator.getInstance(input); }
input=Thread.currentThread().getContextClassLoader().getResourceAsStream(input_file); conf=XmlConfigurator.getInstance(input); String tmp=conf.getProtocolStackString(); System.out.println("\n" + tmp);
/** * Returns an XmlConfigurator based on the provided properties string (if possible). * * @param properties a string representing a system resource containing a JGroups XML configuration, a string * representing a URL pointing to a JGroups ML configuration, or a string representing a file * name that contains a JGroups XML configuration. * @return an XmlConfigurator instance based on the provided properties string; {@code null} if the provided * properties string does not point to an XML configuration. * @throws IOException if the provided properties string appears to be a valid URL but is unreachable, or if the * JGroups XML configuration pointed to by the URL can not be parsed. */ static XmlConfigurator getXmlConfigurator(String properties) throws IOException { XmlConfigurator returnValue=null; InputStream configStream=getConfigStream(properties); if(configStream == null && properties.endsWith("xml")) throw new FileNotFoundException(String.format(Util.getMessage("FileNotFound"), properties)); if (configStream != null) { checkJAXPAvailability(); returnValue=XmlConfigurator.getInstance(configStream); } return returnValue; }
public static ProtocolStackConfigurator getStackConfigurator(InputStream input) throws Exception { return XmlConfigurator.getInstance(input); }
public static XmlConfigurator getInstance(InputStream stream) throws java.io.IOException { return getInstance(stream, null); }
public static XmlConfigurator getInstance(URL url) throws java.io.IOException { return getInstance(url.openStream()); }
public static XmlConfigurator getInstance(URL url, Boolean validate) throws java.io.IOException { InputStream is = url.openStream(); try { return getInstance(is, validate); } finally { Util.close(is); } }
/** * Returns a protocol stack configurator based on the XML configuration provided by the specified XML element. * * @param element a XML element containing a JGroups XML configuration. * @return a {@code ProtocolStackConfigurator} containing the stack configuration. * @throws Exception if problems occur during the configuration of the protocol stack. */ public static ProtocolStackConfigurator getStackConfigurator(Element element) throws Exception { checkForNullConfiguration(element); return XmlConfigurator.getInstance(element); }
private static ProtocolStackConfigurator load(String resource) throws IllegalStateException { URL url = find(resource, JGroupsExtension.class.getClassLoader()); ROOT_LOGGER.debugf("Loading JGroups protocol defaults from %s", url.toString()); try { return XmlConfigurator.getInstance(url); } catch (IOException e) { throw new IllegalArgumentException(JGroupsLogger.ROOT_LOGGER.parserFailure(url)); } }
private static ProtocolStackConfigurator load(String resource) throws IllegalStateException { URL url = find(resource, JGroupsExtension.class.getClassLoader()); ROOT_LOGGER.debugf("Loading JGroups protocol defaults from %s", url.toString()); try { return XmlConfigurator.getInstance(url); } catch (IOException e) { throw new IllegalArgumentException(JGroupsLogger.ROOT_LOGGER.parserFailure(url)); } }
/** * Returns a protocol stack configurator based on the XML configuration provided by the specified File. * * @param file a File with a JGroups XML configuration. * @return a {@code ProtocolStackConfigurator} containing the stack configuration. * @throws Exception if problems occur during the configuration of the protocol stack. */ public static ProtocolStackConfigurator getStackConfigurator(File file) throws Exception { checkJAXPAvailability(); InputStream input=getConfigStream(file); return XmlConfigurator.getInstance(input); }
/** * Returns a protocol stack configurator based on the XML configuration provided at the specified URL. * * @param url a URL pointing to a JGroups XML configuration. * @return a {@code ProtocolStackConfigurator} containing the stack configuration. * @throws Exception if problems occur during the configuration of the protocol stack. */ public static ProtocolStackConfigurator getStackConfigurator(URL url) throws Exception { checkForNullConfiguration(url); checkJAXPAvailability(); return XmlConfigurator.getInstance(url); }
private static ProtocolStackConfigurator load(String resource) throws StartException { URL url = find(resource, JGroupsExtension.class.getClassLoader()); ROOT_LOGGER.debugf("Loading JGroups protocol defaults from %s", url.toString()); try { return XmlConfigurator.getInstance(url); } catch (IOException e) { throw new StartException(MESSAGES.parserFailure(url)); } }