Package org.apache.camel.blueprint
Class BlueprintCamelStateService
- java.lang.Object
-
- org.apache.camel.blueprint.BlueprintCamelStateService
-
public class BlueprintCamelStateService extends Object
Used byBlueprintCamelContextto 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 Modifier and Type Class Description static classBlueprintCamelStateService.State
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description BlueprintCamelStateService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Unregisters any OSGi service registeredorg.osgi.framework.BundleContextgetBundleContext()Map<String,Throwable>getExceptions(org.osgi.framework.Bundle bundle)Get exceptions for all camel contexts for given bundleList<BlueprintCamelStateService.State>getStates(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 Detail
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Detail
-
BlueprintCamelStateService
public BlueprintCamelStateService()
-
-
Method Detail
-
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
public List<BlueprintCamelStateService.State> getStates(org.osgi.framework.Bundle bundle)
Get states for all context registered for givenBundle- 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
-
-