org.apache.camel.karaf.commands.internal
Class CamelControllerImpl

java.lang.Object
  extended by org.apache.camel.karaf.commands.internal.CamelControllerImpl
All Implemented Interfaces:
CamelController

public class CamelControllerImpl
extends Object
implements CamelController

Implementation of CamelController.


Constructor Summary
CamelControllerImpl()
           
 
Method Summary
 org.apache.camel.CamelContext getCamelContext(String name)
          Get a Camel context identified by the given name.
 List<org.apache.camel.CamelContext> getCamelContexts()
          Get the list of Camel context.
 org.apache.camel.Route getRoute(String routeId, String camelContextName)
          Return the route with the given route ID.
 org.apache.camel.model.RouteDefinition getRouteDefinition(String routeId, String camelContextName)
          Return the definition of a route identified by a ID and a Camel context.
 List<org.apache.camel.model.RouteDefinition> getRouteDefinitions(String camelContextName)
          Get all route definitions.
 List<org.apache.camel.Route> getRoutes(String camelContextName)
          Get all routes.
 List<org.apache.camel.Route> getRoutes(String camelContextName, String filter)
          Get all routes filtered by the regex.
 void setBundleContext(org.osgi.framework.BundleContext bundleContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelControllerImpl

public CamelControllerImpl()
Method Detail

setBundleContext

public void setBundleContext(org.osgi.framework.BundleContext bundleContext)

getCamelContexts

public List<org.apache.camel.CamelContext> getCamelContexts()
Description copied from interface: CamelController
Get the list of Camel context.

Specified by:
getCamelContexts in interface CamelController
Returns:
the list of Camel contexts.

getCamelContext

public org.apache.camel.CamelContext getCamelContext(String name)
Description copied from interface: CamelController
Get a Camel context identified by the given name.

Specified by:
getCamelContext in interface CamelController
Parameters:
name - the Camel context name.
Returns:
the Camel context or null if not found.

getRoutes

public List<org.apache.camel.Route> getRoutes(String camelContextName)
Description copied from interface: CamelController
Get all routes. If Camel context name is null, all routes from all contexts are listed.

Specified by:
getRoutes in interface CamelController
Parameters:
camelContextName - the Camel context name. If null, all contexts are considered.
Returns:
the list of the Camel routes.

getRoutes

public List<org.apache.camel.Route> getRoutes(String camelContextName,
                                              String filter)
Description copied from interface: CamelController
Get all routes filtered by the regex.

Specified by:
getRoutes in interface CamelController
Parameters:
camelContextName - the Camel context name. If null, all contexts are considered.
filter - the filter which supports * and ? as wildcards
Returns:
the list of the Camel routes.

getRouteDefinitions

public List<org.apache.camel.model.RouteDefinition> getRouteDefinitions(String camelContextName)
Description copied from interface: CamelController
Get all route definitions. If Camel context name is null, all route definitions from all contexts are listed.

Specified by:
getRouteDefinitions in interface CamelController
Parameters:
camelContextName - the Camel context name. If null, all contexts are considered.
Returns:
the list of the Camel route definitions.

getRoute

public org.apache.camel.Route getRoute(String routeId,
                                       String camelContextName)
Description copied from interface: CamelController
Return the route with the given route ID.

Specified by:
getRoute in interface CamelController
Parameters:
routeId - the route ID.
camelContextName - the Camel context name.
Returns:
the route.

getRouteDefinition

public org.apache.camel.model.RouteDefinition getRouteDefinition(String routeId,
                                                                 String camelContextName)
Description copied from interface: CamelController
Return the definition of a route identified by a ID and a Camel context.

Specified by:
getRouteDefinition in interface CamelController
Parameters:
routeId - the route ID.
camelContextName - the Camel context.
Returns:
the RouteDefinition.


Apache CAMEL