public AtmosphereConfig parse(AtmosphereConfig config, String filename) throws FileNotFoundException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { return parse(config, factory.newDocumentBuilder().parse(filename)); } catch (SAXException e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); } catch (IOException e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); } catch (ParserConfigurationException e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); } }
public AtmosphereConfig parse(AtmosphereConfig config, InputStream stream) throws FileNotFoundException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { return parse(config, factory.newDocumentBuilder().parse(stream)); } catch (SAXException e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); } catch (IOException e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); } catch (ParserConfigurationException e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); } }
AtmosphereConfigReader.getInstance().parse(config, stream); AtmosphereHandler handler = null; for (AtmosphereHandlerConfig atmoHandler : config.getAtmosphereHandlerConfig()) {
/** * Create a {@link Dom} element from META-INF/atmosphere.xml * @param stream */ public AtmosphereConfigReader(InputStream stream) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { parse(factory.newDocumentBuilder().parse(stream)); } catch (SAXException e) { logger.log(Level.SEVERE, e.getMessage(), e); throw new RuntimeException(e); } catch (IOException e) { logger.log(Level.SEVERE, e.getMessage(), e); throw new RuntimeException(e); } catch (ParserConfigurationException e) { logger.log(Level.SEVERE, e.getMessage(), e); throw new RuntimeException(e); } }