public interface Service extends AutoCloseable
| Modifier and Type | Method and 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 to
stop() so it can be used in
try-with-resources expression. |
default void |
init()
Initialize the service
|
void |
start()
Starts the service
|
void |
stop()
Stops the service
|
default void build()
RuntimeCamelException - is thrown if build faileddefault void init()
RuntimeCamelException - is thrown if initialization failedvoid start()
RuntimeCamelException - is thrown if starting failedvoid stop()
RuntimeCamelException - is thrown if stopping faileddefault void close()
throws IOException
stop() so it can be used in
try-with-resources expression.close in interface AutoCloseableIOException - per contract of AutoCloseable if
stop() failsApache Camel