Package org.apache.camel
Interface Service
-
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
ApiEndpoint
,AsyncEndpoint
,AsyncProcessorAwaitManager
,AsyncProducer
,BatchConsumer
,BeanIntrospection
,BrowsableEndpoint
,CamelClusterService
,CamelClusterView
,CamelPreemptiveClusterService
,CamelPreemptiveClusterView
,ClaimCheckRepository
,CliConnector
,Component
,Consumer
,ConsumerCache
,ConsumerTemplate
,ContextReloadStrategy
,DataFormat
,Debugger
,DelegateEndpoint
,DevConsoleRegistry
,Endpoint
,EndpointRegistry<K>
,ExchangeFactory
,ExchangeFactoryManager
,ExecutorServiceManager
,ExtendedRoutesBuilderLoader
,FluentProducerTemplate
,HealthCheckRegistry
,IdempotentRepository
,InflightRepository
,InterceptSendToEndpoint
,ManagementAgent
,ManagementMBeanAssembler
,ManagementStrategy
,MessageHistoryFactory
,PackageScanClassResolver
,PackageScanResourceResolver
,PollingConsumer
,PooledObjectFactory<T>
,ProcessorExchangeFactory
,Producer
,ProducerCache
,ProducerTemplate
,PropertiesComponent
,ReloadStrategy
,ResourceReloadStrategy
,ResourceResolver
,RestRegistry
,ResumeStrategy
,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 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.default void
close()
Delegates tostop()
so it can be used in try-with-resources expression.default void
init()
Initialize the servicevoid
start()
Starts the servicevoid
stop()
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 IOException
Delegates tostop()
so it can be used in try-with-resources expression.- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
- per contract ofAutoCloseable
ifstop()
fails
-
-