Package org.apache.camel.blueprint
Class BlueprintCamelStateService
java.lang.Object
org.apache.camel.blueprint.BlueprintCamelStateService
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.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Unregisters any OSGi service registeredorg.osgi.framework.BundleContextgetExceptions(org.osgi.framework.Bundle bundle) Get exceptions for all camel contexts for given bundlegetStates(org.osgi.framework.Bundle bundle) Get states for all context registered for givenBundlevoidinit()Attempts to register Karaf-specific BundleStateService - if possiblevoidsetBundleContext(org.osgi.framework.BundleContext bundleContext) voidsetBundleState(org.osgi.framework.Bundle bundle, String contextId, BlueprintCamelStateService.State state) One of fourstatesis set for givenBundleand context Id.voidsetBundleState(org.osgi.framework.Bundle bundle, String contextId, BlueprintCamelStateService.State state, Throwable t) One of fourstatesis set for givenBundleand context Id.
-
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 fourstatesis set for givenBundleand 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 fourstatesis set for givenBundleand context Id. One (blueprint) bundle may declare one or more Camel context.- Parameters:
contextId-state-t-
-
getStates
Get states for all context registered for givenBundle- Parameters:
bundle-- Returns:
-
getExceptions
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
-