Package org.apache.camel
Interface Service
-
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
ApiEndpoint,AsyncEndpoint,AsyncProcessorAwaitManager,AsyncProducer,BatchConsumer,BeanIntrospection,BrowsableEndpoint,CamelClusterService,CamelClusterView,CamelPreemptiveClusterService,CamelPreemptiveClusterView,ClaimCheckRepository,Component,Consumer,ConsumerCache,ConsumerTemplate,DataFormat,Debugger,DelegateEndpoint,Endpoint,EndpointRegistry<K>,ExchangeFactory,ExchangeFactoryManager,ExecutorServiceManager,FluentProducerTemplate,HealthCheckRegistry,IdempotentRepository,InflightRepository,InterceptSendToEndpoint,ManagementAgent,ManagementMBeanAssembler,ManagementStrategy,MessageHistoryFactory,PackageScanClassResolver,PackageScanResourceResolver,PollingConsumer,PooledObjectFactory<T>,ProcessorExchangeFactory,Producer,ProducerCache,ProducerTemplate,PropertiesComponent,ResourceReloadStrategy,ResourceResolver,RestRegistry,RouteController,RoutesBuilderLoader,RuntimeCamelCatalog,RuntimeEndpointRegistry,ScheduledPollConsumerScheduler,SendDynamicAware,ServiceRegistry,ShutdownableService,ShutdownStrategy,StartupStepRecorder,StatefulService,StateRepository<K,V>,StaticService,StreamCachingStrategy,SupervisingRouteController,SuspendableService,TimeoutMap<K,V>,Tracer,TransformerRegistry<K>,TypeConverterRegistry,ValidatorRegistry<K>
- All Known Implementing Classes:
ServiceSupport,Transformer,Validator
public interface Service extends AutoCloseable
Represents the core lifecycle API for services which can be initialized, started and stopped
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default 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 Detail
-
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
void start()
Starts the service- Throws:
RuntimeCamelException- is thrown if starting failed
-
stop
void stop()
Stops the service- Throws:
RuntimeCamelException- is thrown if stopping failed
-
close
default void close() throws IOExceptionDelegates tostop()so it can be used in try-with-resources expression.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException- per contract ofAutoCloseableifstop()fails
-
-