Package com.streamreduce.util

Examples of com.streamreduce.util.PingdomClient


        }
    }

    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"));
View Full Code Here


        return SUPPORTED_AUTH_TYPES;
    }

    @Override
    public PingdomClient getClient(Connection connection) {
        return new PingdomClient(connection);
    }
View Full Code Here

TOP

Related Classes of com.streamreduce.util.PingdomClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.