public void endpointAdded(Endpoint endpoint) { log.info("Endpoint : " + endpoint.getName() + " was added " + "to the Synapse configuration successfully"); }
public void endpointRemoved(Endpoint endpoint) { log.info("Endpoint : " + endpoint.getName() + " was removed " + "from the Synapse configuration successfully"); }
/** * Returns the map of defined endpoints in the configuration excluding the * fetched endpoints from remote registry * * @return Map of Endpoints defined in the local configuration */ public Map<String, Endpoint> getDefinedEndpoints() { Map<String, Endpoint> definedEndpoints = new HashMap<String, Endpoint>(); synchronized (this) { for (Object o : localRegistry.values()) { if (o instanceof Endpoint) { Endpoint ep = (Endpoint) o; definedEndpoints.put(ep.getName(), ep); } } } return definedEndpoints; }
/** * Returns the map of defined endpoints in the configuration excluding the * fetched endpoints from remote registry * * @return Map of Endpoints defined in the local configuration */ public Map<String, Endpoint> getDefinedEndpoints() { Map<String, Endpoint> definedEndpoints = new HashMap<String, Endpoint>(); synchronized (this) { for (Object o : localRegistry.values()) { if (o instanceof Endpoint) { Endpoint ep = (Endpoint) o; definedEndpoints.put(ep.getName(), ep); } } } return definedEndpoints; }
public void endpointAdded(Endpoint endpoint) { if (endpoint.getArtifactContainerName() != null) { log.info("Endpoint : " + endpoint.getName() + " was added " + "to the Synapse configuration successfully - " + endpoint.getArtifactContainerName()); } else { log.info("Endpoint : " + endpoint.getName() + " was added " + "to the Synapse configuration successfully"); } }
public void endpointRemoved(Endpoint endpoint) { if (endpoint.getArtifactContainerName() != null) { log.info("Endpoint : " + endpoint.getName() + " was removed " + "from the Synapse configuration successfully - " + endpoint.getArtifactContainerName()); } else { log.info("Endpoint : " + endpoint.getName() + " was removed " + "from the Synapse configuration successfully"); } }
/** * Steps after successfully forwarding the message to backend * @param endpoint */ private void onForwardSuccess(Endpoint endpoint) { messageConsumer.ack(); attemptCount = 0; isSuccessful = true; if (log.isDebugEnabled()) { log.debug("Successfully forwarded the message to endpoint [" + endpoint.getName() + "]" + " with message processor [" + messageProcessor.getName() + "]."); } }
/** * This method only use in a clustered environment. * * @param endpoint Root endpoint name * @param endpoints children */ public void registerChildren(Endpoint endpoint, List<Endpoint> endpoints) { if (isClustered) { String endpointName = endpoint.getName(); validateInput(endpointName); if (log.isDebugEnabled()) { log.debug("Registering endpoints " + endpoints + " of " + endpointName); } if (!childEndpoints.containsKey(endpointName)) { Map<String, Endpoint> children = new HashMap<String, Endpoint>(); children.put(endpointName, endpoint); fillMap(endpoints, children); childEndpoints.put(endpointName, children); } } }
/** * This method only use in a clustered environment. * * @param endpoint Root endpoint name * @param endpoints children */ public void registerChildren(Endpoint endpoint, List<Endpoint> endpoints) { if (isClustered) { String endpointName = endpoint.getName(); validateInput(endpointName); if (log.isDebugEnabled()) { log.debug("Registering endpoints " + endpoints + " of " + endpointName); } if (!childEndpoints.containsKey(endpointName)) { Map<String, Endpoint> children = new HashMap<String, Endpoint>(); children.put(endpointName, endpoint); fillMap(endpoints, children); childEndpoints.put(endpointName, children); } } }
public void endpointRemoved(Endpoint endpoint) { tracker.get(ENDPOINT).remove(endpoint.getName()); }
public void endpointAdded(Endpoint endpoint) { tracker.get(ENDPOINT).add(endpoint.getName()); }
@Override public void undeploySynapseArtifact(String artifactName) { if (log.isDebugEnabled()) { log.debug("Endpoint Undeployment of the endpoint named : " + artifactName + " : Started"); } try { Endpoint ep = getSynapseConfiguration().getDefinedEndpoints().get(artifactName); if (ep != null) { getSynapseConfiguration().removeEndpoint(artifactName); if (log.isDebugEnabled()) { log.debug("Destroying the endpoint named : " + artifactName); } ep.destroy(); if (log.isDebugEnabled()) { log.debug("Endpoint Undeployment of the endpoint named : " + artifactName + " : Completed"); } log.info("Endpoint named '" + ep.getName() + "' has been undeployed"); } else if (log.isDebugEnabled()) { log.debug("Endpoint " + artifactName + " has already been undeployed"); } } catch (Exception e) { handleSynapseArtifactDeploymentError("Endpoint Undeployement of endpoint named : " + artifactName + " : Failed", e); } }
private String getEndpointName(Endpoint endpoint) { if (endpoint == null) { handleException("Endpoint cannot be null."); } assert endpoint != null; String endpointName = endpoint.getName(); if (endpointName == null && endpoint instanceof IndirectEndpoint) { endpointName = ((IndirectEndpoint) endpoint).getKey(); } validateInput(endpointName); return endpointName; }
protected void serializeCommonAttributes(Endpoint endpoint, OMElement element) { String name = endpoint.getName(); boolean anon = ((AbstractEndpoint) endpoint).isAnonymous(); if (name != null && !anon) { element.addAttribute("name", name, null); } //serialize the message stores String messageStore = endpoint.getErrorHandler(); if (messageStore != null) { element.addAttribute(EndpointFactory.ON_FAULT_Q.getLocalPart(), messageStore, null); } }
private String getEndpointName(Endpoint endpoint) { if (endpoint == null) { handleException("Endpoint cannot be null."); } assert endpoint != null; String endpointName = endpoint.getName(); if (endpointName == null && endpoint instanceof IndirectEndpoint) { endpointName = ((IndirectEndpoint) endpoint).getKey(); } validateInput(endpointName); return endpointName; }
protected void serializeCommonAttributes(Endpoint endpoint, OMElement element) { String name = endpoint.getName(); boolean anon = ((AbstractEndpoint) endpoint).isAnonymous(); if (name != null && !anon) { element.addAttribute("name", name, null); } //serialize the message stores String messageStore = endpoint.getErrorHandler(); if (messageStore != null) { element.addAttribute(EndpointFactory.ON_FAULT_Q.getLocalPart(), messageStore, null); } }
@Override protected OMElement serializeEndpoint(Endpoint endpoint) { if (!(endpoint instanceof ClassEndpoint)) { handleException("Invalid endpoint :" + endpoint.getName()); } fac = OMAbstractFactory.getOMFactory(); ClassEndpoint classEndpoint = (ClassEndpoint) endpoint; OMElement endpointElement = fac.createOMElement("endpoint", SynapseConstants.SYNAPSE_OMNAMESPACE); serializeCommonAttributes(classEndpoint, endpointElement); OMElement clazzElement = fac.createOMElement("class", SynapseConstants.SYNAPSE_OMNAMESPACE); if (classEndpoint.getClassEndpoint() != null && classEndpoint.getClassEndpoint().getClass().getName() != null) { clazzElement.addAttribute(fac.createOMAttribute("name",SynapseConstants.NULL_NAMESPACE, classEndpoint.getClassEndpoint(). getClass().getName())); } else { handleException("Invalid class endpoint. Class name is required"); } serializeParameters(classEndpoint, clazzElement); endpointElement.addChild(clazzElement); return endpointElement; }
public OMElement serializeEndpoint(Endpoint epr, SynapseConfiguration synapseConfig, OMElement parent) throws Exception { File eprDir = createDirectory(currentDirectory, MultiXMLConfigurationBuilder.ENDPOINTS_DIR); OMElement eprElem = EndpointSerializer.getElementFromEndpoint(epr); String fileName = epr.getFileName(); if (fileName != null) { if (currentDirectory == rootDirectory) { handleDeployment(eprDir, fileName, epr.getName(), synapseConfig.getArtifactDeploymentStore()); } File eprFile = new File(eprDir, fileName); writeToFile(eprElem, eprFile); } else if (parent != null) { parent.addChild(eprElem); } return eprElem; }
public OMElement serializeEndpoint(Endpoint epr, SynapseConfiguration synapseConfig, OMElement parent) throws Exception { File eprDir = createDirectory(currentDirectory, MultiXMLConfigurationBuilder.ENDPOINTS_DIR); OMElement eprElem = EndpointSerializer.getElementFromEndpoint(epr); String fileName = epr.getFileName(); if (fileName != null) { if (currentDirectory == rootDirectory) { handleDeployment(eprDir, fileName, epr.getName(), synapseConfig.getArtifactDeploymentStore()); } File eprFile = new File(eprDir, fileName); writeToFile(eprElem, eprFile); } else if (parent != null) { parent.addChild(eprElem); } return eprElem; }
@Override public void endpointAdded(Endpoint endpoint) { ArtifactHolder holder = new ArtifactHolder(); holder.setParent(endpoint.getName()); endpoint.setComponentStatisticsId(holder); ((AbstractEndpoint) endpoint).getDefinition().getAspectConfiguration() .setHashCode(holder.getHashCodeAsString()); StatisticIdentityGenerator.conclude(holder); }