public interface Service extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
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 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 AutoCloseable
IOException
- per contract of AutoCloseable
if
stop()
failsApache Camel