Interface Service
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
ApiEndpoint, AsyncEndpoint, AsyncProcessorAwaitManager, AsyncProducer, BacklogDebugger, BatchConsumer, BeanIntrospection, BrowsableEndpoint, BrowsableVariableRepository, CamelClusterService, CamelClusterView, CamelMDCService, CamelMetricsService, CamelPreemptiveClusterService, CamelPreemptiveClusterView, CamelTracingService, ClaimCheckRepository, CliConnector, Component, Consumer, ConsumerCache, ConsumerTemplate, ContextReloadStrategy, ContextServiceLoaderPluginResolver, DataFormat, Debugger, DelegateEndpoint, DevConsoleRegistry, DevConsoleResolver, DumpRoutesStrategy, DynamicPollingConsumer, Endpoint, EndpointRegistry, EndpointServiceRegistry, ErrorRegistry, ExchangeFactory, ExchangeFactoryManager, ExecutorServiceManager, ExtendedRoutesBuilderLoader, FluentProducerTemplate, HealthCheckRegistry, IdempotentRepository, InflightRepository, InterceptSendToEndpoint, ManagementAgent, ManagementMBeanAssembler, ManagementStrategy, MessageHistoryFactory, PackageScanClassResolver, PackageScanResourceResolver, PollDynamicAware, PollingConsumer, PooledObjectFactory<T>, ProcessorExchangeFactory, Producer, ProducerCache, ProducerTemplate, PropertiesComponent, ReloadStrategy, Resilience4jMicrometerFactory, ResourceReloadStrategy, ResourceResolver, RestRegistry, ResumeStrategy, RouteController, RoutesBuilderLoader, RuntimeCamelCatalog, RuntimeEndpointRegistry, ScheduledPollConsumerScheduler, SendDynamicAware, ShutdownableService, ShutdownStrategy, SimpleFunctionRegistry, StartupConditionStrategy, StartupStepRecorder, StatefulService, StateRepository<K,V>, StaticService, StreamCachingStrategy, SupervisingRouteController, SuspendableService, TimeoutMap<K, V>, Tracer, TransformerRegistry, TypeConverterRegistry, ValidatorRegistry, VariableRepository
- All Known Implementing Classes:
ServiceSupport, Transformer, Validator
Represents the core lifecycle API for services which can be initialized, started and stopped
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidbuild()Optional build phase which is executed by frameworks that supports pre-building projects (pre-compile) which allows special optimizations such as camel-quarkus.default voidclose()Delegates tostop()so it can be used in try-with-resources expression.default voidinit()Initialize the servicevoidstart()Starts the servicevoidstop()Stops the service
-
Method Details
-
build
default void build()Optional build phase which is executed by frameworks that supports pre-building projects (pre-compile) which allows special optimizations such as camel-quarkus.- Throws:
RuntimeCamelException- is thrown if build failed
-
init
default void init()Initialize the service- Throws:
RuntimeCamelException- is thrown if initialization failed
-
start
-
stop
-
close
Delegates tostop()so it can be used in try-with-resources expression.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- per contract ofAutoCloseableifstop()fails
-