Copy to ClipboardCopied!Toggle word wrapToggle overflow
これで、Java コード内から受信したエクスチェンジを検査できます。
private CamelContext context;
public void inspectReceivedOrders() {
BrowsableEndpoint browse = context.getEndpoint("browse:orderReceived", BrowsableEndpoint.class);
List<Exchange> exchanges = browse.getExchanges();
// then we can inspect the list of received exchanges from Java
for (Exchange exchange : exchanges) {
String payload = exchange.getIn().getBody();
// do something with payload
}
}
private CamelContext context;
public void inspectReceivedOrders() {
BrowsableEndpoint browse = context.getEndpoint("browse:orderReceived", BrowsableEndpoint.class);
List<Exchange> exchanges = browse.getExchanges();
// then we can inspect the list of received exchanges from Java
for (Exchange exchange : exchanges) {
String payload = exchange.getIn().getBody();
// do something with payload
}
}
Copy to ClipboardCopied!Toggle word wrapToggle overflow