}
}
private void pullPingdomActivity(Connection connection)
throws ConnectionNotFoundException, InvalidCredentialsException, IOException {
PingdomClient client = (PingdomClient)getClient(connection);
Map<String,InventoryItem> inventoryItemMap = getInventoryItemMap(connection);
Date lastActivityPoll = connection.getLastActivityPollDate();
if (lastActivityPoll != null) {
logger.debug("Creating Pingdom messages for messages newer than (" + lastActivityPoll + ") for [" +
connection.getId() + "]: " + connection.getAlias());
} else {
logger.debug("Creating Pingdom messages for all messages [" + connection.getId() + "]: "
+ connection.getAlias());
}
try {
List<JSONObject> jsonInventoryList = client.checks();
for (Iterator<JSONObject> i = jsonInventoryList.iterator(); i.hasNext();) {
JSONObject jsonInventory = i.next();
InventoryItem inventoryItem = inventoryItemMap.get(jsonInventory.getString("id"));