/** * Lookup an endpoint for the given message. The extraction of the endpoint key is delegated to the concrete * subclass. * * @return the looked up endpoint, or {@code null} */ @Override protected final Object getEndpointInternal(MessageContext messageContext) throws Exception { String key = getLookupKeyForMessage(messageContext); if (!StringUtils.hasLength(key)) { return null; } if (logger.isDebugEnabled()) { logger.debug("Looking up endpoint for [" + key + "]"); } return lookupEndpoint(key); }
for (String key : temporaryEndpointMap.keySet()) { Object endpoint = temporaryEndpointMap.get(key); if (!validateLookupKey(key)) { throw new ApplicationContextException("Invalid key [" + key + "] for endpoint [" + endpoint + "]"); registerEndpoint(key, endpoint); logger.debug("Looking for endpoint mappings in application context: [" + getApplicationContext() + "]"); String[] beanNames = getApplicationContext().getBeanDefinitionNames(); for (String beanName : beanNames) { if (validateLookupKey(beanName)) { registerEndpoint(beanName, beanName); String[] aliases = getApplicationContext().getAliases(beanName); for (String aliase : aliases) { if (validateLookupKey(aliase)) { registerEndpoint(aliase, beanName);
/** * Register the given endpoint instance under the registration key. * * @param key the string representation of the registration key * @param endpoint the endpoint instance * @throws org.springframework.beans.BeansException * if the endpoint could not be registered */ protected void registerEndpoint(String key, Object endpoint) throws BeansException { Object mappedEndpoint = endpointMap.get(key); if (mappedEndpoint != null) { throw new ApplicationContextException("Cannot map endpoint [" + endpoint + "] on registration key [" + key + "]: there's already endpoint [" + mappedEndpoint + "] mapped"); } if (!lazyInitEndpoints && endpoint instanceof String) { String endpointName = (String) endpoint; endpoint = resolveStringEndpoint(endpointName); } if (endpoint == null) { throw new ApplicationContextException("Could not find endpoint for key [" + key + "]"); } endpointMap.put(key, endpoint); if (logger.isDebugEnabled()) { logger.debug("Mapped key [" + key + "] onto endpoint [" + endpoint + "]"); } }
for (String key : temporaryEndpointMap.keySet()) { Object endpoint = temporaryEndpointMap.get(key); if (!validateLookupKey(key)) { throw new ApplicationContextException("Invalid key [" + key + "] for endpoint [" + endpoint + "]"); registerEndpoint(key, endpoint); logger.debug("Looking for endpoint mappings in application context: [" + getApplicationContext() + "]"); String[] beanNames = getApplicationContext().getBeanDefinitionNames(); for (String beanName : beanNames) { if (validateLookupKey(beanName)) { registerEndpoint(beanName, beanName); String[] aliases = getApplicationContext().getAliases(beanName); for (String aliase : aliases) { if (validateLookupKey(aliase)) { registerEndpoint(aliase, beanName);
/** * Register the given endpoint instance under the registration key. * * @param key the string representation of the registration key * @param endpoint the endpoint instance * @throws org.springframework.beans.BeansException * if the endpoint could not be registered */ protected void registerEndpoint(String key, Object endpoint) throws BeansException { Object mappedEndpoint = endpointMap.get(key); if (mappedEndpoint != null) { throw new ApplicationContextException("Cannot map endpoint [" + endpoint + "] on registration key [" + key + "]: there's already endpoint [" + mappedEndpoint + "] mapped"); } if (!lazyInitEndpoints && endpoint instanceof String) { String endpointName = (String) endpoint; endpoint = resolveStringEndpoint(endpointName); } if (endpoint == null) { throw new ApplicationContextException("Could not find endpoint for key [" + key + "]"); } endpointMap.put(key, endpoint); if (logger.isDebugEnabled()) { logger.debug("Mapped key [" + key + "] onto endpoint [" + endpoint + "]"); } }
for (String key : temporaryEndpointMap.keySet()) { Object endpoint = temporaryEndpointMap.get(key); if (!validateLookupKey(key)) { throw new ApplicationContextException("Invalid key [" + key + "] for endpoint [" + endpoint + "]"); registerEndpoint(key, endpoint); logger.debug("Looking for endpoint mappings in application context: [" + getApplicationContext() + "]"); String[] beanNames = getApplicationContext().getBeanDefinitionNames(); for (String beanName : beanNames) { if (validateLookupKey(beanName)) { registerEndpoint(beanName, beanName); String[] aliases = getApplicationContext().getAliases(beanName); for (String aliase : aliases) { if (validateLookupKey(aliase)) { registerEndpoint(aliase, beanName);
/** * Lookup an endpoint for the given message. The extraction of the endpoint key is delegated to the concrete * subclass. * * @return the looked up endpoint, or <code>null</code> */ @Override protected final Object getEndpointInternal(MessageContext messageContext) throws Exception { String key = getLookupKeyForMessage(messageContext); if (!StringUtils.hasLength(key)) { return null; } if (logger.isDebugEnabled()) { logger.debug("Looking up endpoint for [" + key + "]"); } return lookupEndpoint(key); }
/** * Register the given endpoint instance under the registration key. * * @param key the string representation of the registration key * @param endpoint the endpoint instance * @throws org.springframework.beans.BeansException * if the endpoint could not be registered */ protected void registerEndpoint(String key, Object endpoint) throws BeansException { Object mappedEndpoint = endpointMap.get(key); if (mappedEndpoint != null) { throw new ApplicationContextException("Cannot map endpoint [" + endpoint + "] on registration key [" + key + "]: there's already endpoint [" + mappedEndpoint + "] mapped"); } if (!lazyInitEndpoints && endpoint instanceof String) { String endpointName = (String) endpoint; endpoint = resolveStringEndpoint(endpointName); } if (endpoint == null) { throw new ApplicationContextException("Could not find endpoint for key [" + key + "]"); } endpointMap.put(key, endpoint); if (logger.isDebugEnabled()) { logger.debug("Mapped key [" + key + "] onto endpoint [" + endpoint + "]"); } }
for (String key : temporaryEndpointMap.keySet()) { Object endpoint = temporaryEndpointMap.get(key); if (!validateLookupKey(key)) { throw new ApplicationContextException("Invalid key [" + key + "] for endpoint [" + endpoint + "]"); registerEndpoint(key, endpoint); logger.debug("Looking for endpoint mappings in application context: [" + getApplicationContext() + "]"); String[] beanNames = getApplicationContext().getBeanDefinitionNames(); for (String beanName : beanNames) { if (validateLookupKey(beanName)) { registerEndpoint(beanName, beanName); String[] aliases = getApplicationContext().getAliases(beanName); for (String aliase : aliases) { if (validateLookupKey(aliase)) { registerEndpoint(aliase, beanName);
/** * Lookup an endpoint for the given message. The extraction of the endpoint key is delegated to the concrete * subclass. * * @return the looked up endpoint, or {@code null} */ @Override protected final Object getEndpointInternal(MessageContext messageContext) throws Exception { String key = getLookupKeyForMessage(messageContext); if (!StringUtils.hasLength(key)) { return null; } if (logger.isDebugEnabled()) { logger.debug("Looking up endpoint for [" + key + "]"); } return lookupEndpoint(key); }
/** * Register the given endpoint instance under the registration key. * * @param key the string representation of the registration key * @param endpoint the endpoint instance * @throws org.springframework.beans.BeansException * if the endpoint could not be registered */ protected void registerEndpoint(String key, Object endpoint) throws BeansException { Object mappedEndpoint = endpointMap.get(key); if (mappedEndpoint != null) { throw new ApplicationContextException("Cannot map endpoint [" + endpoint + "] on registration key [" + key + "]: there's already endpoint [" + mappedEndpoint + "] mapped"); } if (!lazyInitEndpoints && endpoint instanceof String) { String endpointName = (String) endpoint; endpoint = resolveStringEndpoint(endpointName); } if (endpoint == null) { throw new ApplicationContextException("Could not find endpoint for key [" + key + "]"); } endpointMap.put(key, endpoint); if (logger.isDebugEnabled()) { logger.debug("Mapped key [" + key + "] onto endpoint [" + endpoint + "]"); } }
/** * Lookup an endpoint for the given message. The extraction of the endpoint key is delegated to the concrete * subclass. * * @return the looked up endpoint, or {@code null} */ @Override protected final Object getEndpointInternal(MessageContext messageContext) throws Exception { String key = getLookupKeyForMessage(messageContext); if (!StringUtils.hasLength(key)) { return null; } if (logger.isDebugEnabled()) { logger.debug("Looking up endpoint for [" + key + "]"); } return lookupEndpoint(key); }