use of ddf.catalog.operation.Pingable in project ddf by codice.
the class ListCommand method printSubscription.
private void printSubscription(Map.Entry<String, ServiceReference<Subscription>> entry) {
PrintStream console = System.out;
Subscription subscription = bundleContext.getService(entry.getValue());
String rowColor = "";
if (subscription != null && subscription.getDeliveryMethod() instanceof Pingable && !((Pingable) subscription.getDeliveryMethod()).ping()) {
rowColor = RED_CONSOLE_COLOR;
}
console.println(String.format("%s%s\t %s%s", rowColor, entry.getKey(), entry.getValue().getProperty("event-endpoint"), DEFAULT_CONSOLE_COLOR));
}
Aggregations