Interface CamelContextAware

All Superinterfaces:
HasCamelContext
All Known Subinterfaces:
CamelClusterService, CamelClusterView, CamelMDCService, CamelMetricsService, CamelPreemptiveClusterService, CamelPreemptiveClusterView, CamelTracingService, Component, ContextReloadStrategy, ContextServiceLoaderPluginResolver, Debugger, DevConsoleRegistry, DevConsoleResolver, EndpointUriFactory, ExchangeFactory, ExtendedRoutesBuilderLoader, HealthCheckRegistry, HealthCheckResolver, MessageHistoryFactory, PollDynamicAware, PooledObjectFactory<T>, ProcessorExchangeFactory, ReloadStrategy, Resilience4jMicrometerFactory, ResourceLoader, ResourceReloadStrategy, ResourceResolver, RouteController, RoutesBuilderLoader, RoutesLoader, RuntimeCamelCatalog, ScheduledPollConsumerScheduler, SendDynamicAware, SSLContextParametersAware, SupervisingRouteController, TypeConverterRegistry
All Known Implementing Classes:
BaseSSLContextParameters, FilterParameters, JsseParameters, KeyManagersParameters, KeyStoreParameters, SecureRandomParameters, SSLContextClientParameters, SSLContextParameters, SSLContextServerParameters, Transformer, TrustManagersParameters, Validator

public interface CamelContextAware extends HasCamelContext
Marker for objects that wish to receive the owning CamelContext.

Camel inspects objects added to the context (components, processors, beans registered in the Registry, route policies, ...) and, when they implement this interface, setCamelContext(CamelContext) is called so they can keep a reference to their context. This is the standard way for SPI implementations and user beans to reach into Camel APIs from inside a route.

The static trySetCamelContext(Object, CamelContext) helper is convenient for code paths that wire up arbitrary objects without first knowing whether they need the context.

See Also:
  • Method Details