Here are the examples of the java api class org.apache.activemq.artemis.core.deployers.Deployable taken from open source projects.
1. FileDeploymentManager#buildService()
Project: activemq-artemis
File: FileDeploymentManager.java
File: FileDeploymentManager.java
/* * Build a set of ActiveMQComponents from the Deployables configured */ public Map<String, ActiveMQComponent> buildService(ActiveMQSecurityManager securityManager, MBeanServer mBeanServer) throws Exception { Map<String, ActiveMQComponent> components = new HashMap<>(); for (Deployable deployable : deployables.values()) { // if the deployable was parsed then build the service if (deployable.isParsed()) { deployable.buildService(securityManager, mBeanServer, deployables, components); } } return components; }
2. FileDeploymentManager#readConfiguration()
Project: activemq-artemis
File: FileDeploymentManager.java
File: FileDeploymentManager.java
/* * parse a set of configuration with the Deployables that were given. */ public void readConfiguration() throws Exception { URL url; url = Thread.currentThread().getContextClassLoader().getResource(configurationUrl); if (url == null) { // trying a different classloader now url = getClass().getClassLoader().getResource(configurationUrl); } if (url == null) { // The URL is outside of the classloader. Trying a pure url now url = new URL(configurationUrl); } // create a reader Reader reader = new InputStreamReader(url.openStream()); String xml = XMLUtil.readerToString(reader); //replace any system props xml = XMLUtil.replaceSystemProps(xml); Element e = XMLUtil.stringToElement(xml); //iterate around all the deployables for (Deployable deployable : deployables.values()) { String root = deployable.getRootElement(); NodeList children = e.getElementsByTagName(root); //if the root element exists then parse it if (root != null && children.getLength() > 0) { Node item = children.item(0); XMLUtil.validate(item, deployable.getSchema()); deployable.parse((Element) item); } } }