private void dumpCamelContext(String msg) {
   LOGGER.debug("\n\n***************  START: " + msg + "  *****************");
   List<RouteDefinition> routeDefinitions = camelContext.getRouteDefinitions();
   if (routeDefinitions != null) {
     LOGGER.debug("Number of routes = " + routeDefinitions.size());
     for (RouteDefinition routeDef : routeDefinitions) {
       String routeId = routeDef.getId();
       LOGGER.debug("route ID = " + routeId);
       List<FromDefinition> routeInputs = routeDef.getInputs();
       if (routeInputs.isEmpty()) {
         LOGGER.debug("routeInputs are EMPTY");
       } else {
         for (FromDefinition fromDef : routeInputs) {
           LOGGER.debug("route input's URI = " + fromDef.getUri());
         }
       }
       ServiceStatus routeStatus = camelContext.getRouteStatus(routeId);
       if (routeStatus != null) {
         LOGGER.debug("Route ID " + routeId + " is started = " + routeStatus.isStarted());
       } else {
         LOGGER.debug("routeStatus is NULL for routeId = " + routeId);
       }
     }
   }
   LOGGER.debug("***************  END: " + msg + "  *****************\n\n");
 }
 public static String getUri(FromDefinition input) {
   String key = input.getUri();
   if (Strings2.isEmpty(key)) {
     String ref = input.getRef();
     if (!Strings2.isEmpty(ref)) {
       return "ref:" + ref;
     }
   }
   return key;
 }
 private void findInputComponents(
     List<FromDefinition> defs,
     Set<String> components,
     Set<String> languages,
     Set<String> dataformats) {
   if (defs != null) {
     for (FromDefinition def : defs) {
       findUriComponent(def.getUri(), components);
     }
   }
 }
 private static final void addNamespaceParameterFrom(FromDefinition fromDef, String namespace) {
   String old_uri = fromDef.getUri();
   String new_uri = addNamespaceParameter(old_uri, namespace);
   fromDef.setUri(new_uri);
   setEndpointUri(fromDef.getEndpoint(), namespace);
 }
Example #5
0
 public Endpoint getEndpoint() {
   if (endpoint == null) {
     endpoint = from.resolveEndpoint(this);
   }
   return endpoint;
 }
Example #6
0
 protected String description() {
   return FromDefinition.description(getResourceUri(), getResourceRef(), (Endpoint) null);
 }