public class BlueprintCamelStateService extends Object
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.Modifier and Type | Class and Description |
---|---|
static class |
BlueprintCamelStateService.State |
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
BlueprintCamelStateService() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Unregisters any OSGi service registered
|
org.osgi.framework.BundleContext |
getBundleContext() |
Map<String,Throwable> |
getExceptions(org.osgi.framework.Bundle bundle)
Get exceptions for all camel contexts for given bundle
|
List<BlueprintCamelStateService.State> |
getStates(org.osgi.framework.Bundle bundle)
Get states for all context registered for given
Bundle |
void |
init()
Attempts to register Karaf-specific BundleStateService - if possible
|
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext) |
void |
setBundleState(org.osgi.framework.Bundle bundle,
String contextId,
BlueprintCamelStateService.State state)
One of four
states is set for given Bundle and context Id. |
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. |
public static final org.slf4j.Logger LOG
public BlueprintCamelStateService()
public org.osgi.framework.BundleContext getBundleContext()
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
public void setBundleState(org.osgi.framework.Bundle bundle, String contextId, BlueprintCamelStateService.State state)
states
is set for given Bundle
and context Id.
One (blueprint) bundle may declare one or more Camel context.contextId
- state
- public void setBundleState(org.osgi.framework.Bundle bundle, String contextId, BlueprintCamelStateService.State state, Throwable t)
states
is set for given Bundle
and context Id.
One (blueprint) bundle may declare one or more Camel context.contextId
- state
- t
- public List<BlueprintCamelStateService.State> getStates(org.osgi.framework.Bundle bundle)
Bundle
bundle
- public Map<String,Throwable> getExceptions(org.osgi.framework.Bundle bundle)
bundle
- public void init()
public void destroy()
Apache Camel