2

我在 Spring Integration 中使用控制总线来启动和停止 mail:inbound-channel-adapter。有什么方法可以检查频道状态吗?如果它正在运行?

非常感谢

4

1 回答 1

3

使用消息网关向控制总线发送消息...

public interface Gateway {
    boolean controlBusBooleanMethod(String command);
}

...

<int:gateway service-interface="foo.Gateway" default-request-channel="toControlBus" />

...

@Autowired
Gateway gateway;

...

boolean isRunning = gateway.controlBusBooleanMethod("@adapter.isRunning()");

....

高温高压

于 2012-12-13T02:21:45.017 回答