Yes, the control bus is good choice for this.
All the Lifecycle methods are available isRunning(), start(), stop().
Probably the easiest mechanism is to create a Messaging gateway with a couple of methods...
Code:
public interface ControlBus {
void sendToVoidMethod(String command); // e.g. @adapter.stop()
boolean sendToBooleanMethod(String command); // e.g. @adapter.isRunning()
}
And then wire up a <gateway/> to talk to the <control-bus/>.
Then inject the gateway into your web controller...
@Autowire private ControlBus gateway;
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware