Class BlueprintCamelStateService

java.lang.Object
org.apache.camel.blueprint.BlueprintCamelStateService

public class BlueprintCamelStateService extends Object
Used by BlueprintCamelContext to inform about state of Camel context. If running inside Karaf and Karaf's BundleStateService is accessible, Camel context state will propagate as extended bundle state.
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

    • BlueprintCamelStateService

      public BlueprintCamelStateService()
  • Method Details

    • getBundleContext

      public org.osgi.framework.BundleContext getBundleContext()
    • setBundleContext

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

      public void setBundleState(org.osgi.framework.Bundle bundle, String contextId, BlueprintCamelStateService.State state)
      One of four states is set for given Bundle and context Id. One (blueprint) bundle may declare one or more Camel context.
      Parameters:
      contextId -
      state -
    • setBundleState

      public void setBundleState(org.osgi.framework.Bundle bundle, String contextId, BlueprintCamelStateService.State state, Throwable t)
      One of four states is set for given Bundle and context Id. One (blueprint) bundle may declare one or more Camel context.
      Parameters:
      contextId -
      state -
      t -
    • getStates

      public List<BlueprintCamelStateService.State> getStates(org.osgi.framework.Bundle bundle)
      Get states for all context registered for given Bundle
      Parameters:
      bundle -
      Returns:
    • getExceptions

      public Map<String,Throwable> getExceptions(org.osgi.framework.Bundle bundle)
      Get exceptions for all camel contexts for given bundle
      Parameters:
      bundle -
      Returns:
    • init

      public void init()
      Attempts to register Karaf-specific BundleStateService - if possible
    • destroy

      public void destroy()
      Unregisters any OSGi service registered