Interface CliConnector
- All Superinterfaces:
AutoCloseable, NonManagedService, Service, StaticService
SPI that exposes a Camel integration to the Camel CLI for local inspection and control.
An implementation is created by
CliConnectorFactory and added as a Service to the
CamelContext lifecycle. Once started, it opens a local communication channel (typically a
platform-specific named pipe or unix-domain socket) that the camel CLI process attaches to for commands such
as camel get, camel top, camel trace, and camel stop. The sigterm() method
is invoked when the CLI requests a graceful shutdown; updateDelay(int) allows the CLI to tune the
connector's internal poll frequency.
See Camel CLI (JBang) in the Camel user manual.- Since:
- 3.19
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidsigterm()Signal to terminate Camel and the JVM.voidupdateDelay(int delay) Allows to adjust the frequency delay which the CliConnect reacts.
-
Method Details
-
sigterm
void sigterm()Signal to terminate Camel and the JVM. The Camel CLI can trigger this by the command: camel stop PID -
updateDelay
void updateDelay(int delay) Allows to adjust the frequency delay which the CliConnect reacts. Uses 1000 millis by default.- Parameters:
delay- delay in millis
-