Search in sources :

Example 6 with CamelConfigurationFailedException

use of won.protocol.exception.CamelConfigurationFailedException in project webofneeds by researchstudio-sat.

the class MatcherProtocolCamelConfiguratorImpl method addRemoteTopicListeners.

@Override
public synchronized void addRemoteTopicListeners(final Set<String> endpoints, final URI remoteEndpoint) throws CamelConfigurationFailedException {
    logger.info("length of endpoints {}", endpoints.size());
    MatcherApplicationListenerRouteBuilder matcherApplicationListenerRouteBuilder = new MatcherApplicationListenerRouteBuilder(getCamelContext(), endpoints, remoteEndpoint);
    try {
        getCamelContext().addRoutes(matcherApplicationListenerRouteBuilder);
    } catch (Exception e) {
        logger.debug("adding route to camel context failed", e);
        throw new CamelConfigurationFailedException("adding route to camel context failed", e);
    }
}
Also used : CamelConfigurationFailedException(won.protocol.exception.CamelConfigurationFailedException) MatcherApplicationListenerRouteBuilder(won.matcher.camel.routes.MatcherApplicationListenerRouteBuilder) CamelConfigurationFailedException(won.protocol.exception.CamelConfigurationFailedException)

Aggregations

CamelConfigurationFailedException (won.protocol.exception.CamelConfigurationFailedException)6 RoutesBuilder (org.apache.camel.RoutesBuilder)2 OwnerApplicationListenerRouteBuilder (won.owner.camel.routes.OwnerApplicationListenerRouteBuilder)2 URI (java.net.URI)1 MatcherApplicationListenerRouteBuilder (won.matcher.camel.routes.MatcherApplicationListenerRouteBuilder)1 NoSuchConnectionException (won.protocol.exception.NoSuchConnectionException)1