/** * Creates a new SCA node from the XML configuration of the node * @param is The input stream that the XML configuration can be read. The stream will be closed * after this call. * @return a new SCA node */ public Node createNode(InputStream is) { NodeConfiguration configuration = loadConfiguration(is, null); return createNode(configuration); }
/** * Find the contribution location by seraching a resource on the classpath * @param resourceName * @return */ public static String getContributionLocation(String resourceName) { return getContributionLocation(null, resourceName); }
/** * Returns the SCA node factory instance. * * @return the SCA node factory */ public synchronized static NodeFactory getInstance() { if (instance == null) { instance = newInstance(); } return instance; }
public final Node createNode(String compositeURI, ClassLoader classLoader) { List<String> locations = ContributionLocationHelper.getContributionLocations(classLoader, compositeURI); return createNode(compositeURI, locations.toArray(new String[locations.size()])); } /**
/** * Create a new SCA node using the list of SCA contributions * @param contributions * @return */ public Node createNode(Contribution... contributions) { NodeConfiguration configuration = createConfiguration(contributions); return createNode(configuration); }
/** * The following methods are used by the node launcher */ public final Node createNode(String deploymentCompositeURI, String[] uris, String locations[]) { return createNode(deploymentCompositeURI, getContributions(Arrays.asList(uris), Arrays.asList(locations))); }
public static void stop(WebContextConfigurator configurator) { Node node = null; if (configurator != null) { node = (Node)configurator.getAttribute(SCA_NODE_ATTRIBUTE); } if (node != null) { node.stop(); configurator.setAttribute(SCA_NODE_ATTRIBUTE, null); } }
public final Node createNode(URI domainRegistryURI, String... locations) { return createNode(domainRegistryURI, null, locations); }
/** * Find the contribution locations by seraching a resource on the classpath * @param resourceName * @return */ public static List<String> getContributionLocations(String resourceName) { return getContributionLocations(null, resourceName); }
private Contribution[] getContributions(List<String> locations) { Contribution[] contributions = new Contribution[locations.size()]; int index = 0; for (String location : locations) { contributions[index++] = new Contribution(location, location); } return contributions; }
public static void destroy() { if (factory != null) { factory.destroy(); } factory = null; host = null; }
/** * Creates a new SCA node from the XML configuration of the node * @param is The input stream that the XML configuration can be read. The stream will be closed * after this call. * @return a new SCA node */ public Node createNode(InputStream is) { NodeConfiguration configuration = loadConfiguration(is, null); return createNode(configuration); }
public final Node createNode(String compositeURI, ClassLoader classLoader) { List<String> locations = ContributionLocationHelper.getContributionLocations(classLoader, compositeURI); return createNode(compositeURI, locations.toArray(new String[locations.size()])); } /**
/** * Create a new SCA node using the list of SCA contributions * @param contributions * @return */ public Node createNode(Contribution... contributions) { NodeConfiguration configuration = createConfiguration(contributions); return createNode(configuration); }
/** * The following methods are used by the node launcher */ public final Node createNode(String deploymentCompositeURI, String[] uris, String locations[]) { return createNode(deploymentCompositeURI, getContributions(Arrays.asList(uris), Arrays.asList(locations))); }
/** * Find the contribution location by seraching a resource on the classpath * @param resourceName * @return */ public static String getContributionLocation(String resourceName) { return getContributionLocation(null, resourceName); }
/** * Returns the SCA node factory instance. * * @return the SCA node factory */ public synchronized static NodeFactory getInstance() { if (instance == null) { instance = newInstance(); } return instance; }
public final Node createNode(URI domainRegistryURI, String... locations) { return createNode(domainRegistryURI, null, locations); }
/** * Find the contribution locations by seraching a resource on the classpath * @param resourceName * @return */ public static List<String> getContributionLocations(String resourceName) { return getContributionLocations(null, resourceName); }
private Contribution[] getContributions(List<String> locations) { Contribution[] contributions = new Contribution[locations.size()]; int index = 0; for (String location : locations) { contributions[index++] = new Contribution(location, location); } return contributions; }