private static void createEndpoints(SynapseConfiguration synapseConfig, String rootDirPath, Properties properties) { File endpointsDir = new File(rootDirPath, ENDPOINTS_DIR); if (endpointsDir.exists()) { if (log.isDebugEnabled()) { log.debug("Loading endpoints from : " + endpointsDir.getPath()); } Iterator endpoints = FileUtils.iterateFiles(endpointsDir, extensions, false); while (endpoints.hasNext()) { File file = (File) endpoints.next(); try { OMElement document = getOMElement(file); Endpoint endpoint = SynapseXMLConfigurationFactory.defineEndpoint( synapseConfig, document, properties); if (endpoint != null) { endpoint.setFileName(file.getName()); synapseConfig.getArtifactDeploymentStore().addArtifact( file.getAbsolutePath(), endpoint.getName()); } } catch (Exception e) { String msg = "Endpoint configuration cannot be built from : " + file.getName(); handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_EP, msg, e); } } } }
private static void createEndpoints(SynapseConfiguration synapseConfig, String rootDirPath, Properties properties) { File endpointsDir = new File(rootDirPath, ENDPOINTS_DIR); if (endpointsDir.exists()) { if (log.isDebugEnabled()) { log.debug("Loading endpoints from : " + endpointsDir.getPath()); } Iterator endpoints = FileUtils.iterateFiles(endpointsDir, extensions, false); while (endpoints.hasNext()) { File file = (File) endpoints.next(); OMElement document = null; try { document = getOMElement(file); } catch (Exception e) { String msg = "Error while building Endpoint configuration from file : " + file.getName(); handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_EP, msg, e); } if (document != null) { Endpoint endpoint = SynapseXMLConfigurationFactory.defineEndpoint( synapseConfig, document, properties); if (endpoint != null) { endpoint.setFileName(file.getName()); synapseConfig.getArtifactDeploymentStore().addArtifact( file.getAbsolutePath(), endpoint.getName()); } } } } }
Endpoint ep = EndpointFactory.getEndpointFromElement(artifactConfig, false, properties); if (ep != null) { ep.setFileName((new File(fileName)).getName()); if (log.isDebugEnabled()) { log.debug("Endpoint named '" + ep.getName()
ep.setFileName((new File(fileName)).getName()); if (log.isDebugEnabled()) { log.debug("Endpoint named '" + ep.getName()
return null; ep.setFileName(new File(fileName).getName());
return null; ep.setFileName(new File(fileName).getName());