IoT CAS Frameworks/IOT_Server/Server_Admin_Framework/source/ConsumerAPI/src/java/com/prokosha/watchdog/WatchAction.java
public static void watchAction(String input) {

        try {
            comparEventArr = input.split(",");

            String[] tempeventArr = null;
            for (String str : comparEventArr) {
                if (comparEventArr != null) {
                    tempeventArr = str.split("=");
                    log.info("tempeventArr[0]=" + tempeventArr[0]);
                    log.info("tempeventArr[1]=" + tempeventArr[1]);
                    if (tempeventArr[0] != null && tempeventArr[0].equalsIgnoreCase("Type") && tempeventArr[1] != null) {
                        log.info("Im in if 2");
                        if (ConfigValues.eventComparMap.containsKey(tempeventArr[1])) {
                            log.info("Im in if 3");
                            curTime = new Date().getTime();
                            ConfigValues.eventComparMap.put(tempeventArr[1], curTime);
                            log.info("Timestamp updated successfully for type " + tempeventArr[1]);

                        }
                    }
                }
            }
        } catch (Exception e) {
            log.debug("error while updateing timestamp" + e);

        }
    }
/*
     * watchAction method is called from StartWatch to update the time interval
     * It maintains a Map<AdapterInstance,TimeStamp> and updates accordingly
     * upon every client(adpter) request
     */
watchAction method is called from StartWatch to update the time interval
It maintains a Map and updates accordingly
upon every client(adpter) request
watchAction method is called from StartWatch to update the time interval It maintains a Map and updates accordingly upon every client ( adpter ) request
public static void watchAction(String input) {
        try {
            comparEventArr = input.split(",");
            String[] tempeventArr = null;
            for (String str : comparEventArr) {
                if (comparEventArr != null) {
                    tempeventArr = str.split("=");
                    log.info("tempeventArr[0]=" + tempeventArr[0]);
                    log.info("tempeventArr[1]=" + tempeventArr[1]);
                    if (tempeventArr[0] != null && tempeventArr[0].equalsIgnoreCase("Type") && tempeventArr[1] != null) {
                        log.info("Im in if 2");
                        if (ConfigValues.eventComparMap.containsKey(tempeventArr[1])) {
                            log.info("Im in if 3");
                            curTime = new Date().getTime();
                            ConfigValues.eventComparMap.put(tempeventArr[1], curTime);
                            log.info("Timestamp updated successfully for type " + tempeventArr[1]);
                        }
                    }
                }
            }
        } catch (Exception e) {
            log.debug("error while updateing timestamp" + e);
        }
    }
public static void watchAction ( String input ) { try { comparEventArr = input . split ( "," ) ; String [ ] tempeventArr = null ; for ( String str : comparEventArr ) { if ( comparEventArr != null ) { tempeventArr = str . split ( "=" ) ; log . info ( "tempeventArr[0]=" + tempeventArr [ 0 ] ) ; log . info ( "tempeventArr[1]=" + tempeventArr [ 1 ] ) ; if ( tempeventArr [ 0 ] != null && tempeventArr [ 0 ] . equalsIgnoreCase ( "Type" ) && tempeventArr [ 1 ] != null ) { log . info ( "Im in if 2" ) ; if ( ConfigValues . eventComparMap . containsKey ( tempeventArr [ 1 ] ) ) { log . info ( "Im in if 3" ) ; curTime = new Date ( ) . getTime ( ) ; ConfigValues . eventComparMap . put ( tempeventArr [ 1 ] , curTime ) ; log . info ( "Timestamp updated successfully for type " + tempeventArr [ 1 ] ) ; } } } } } catch ( Exception e ) { log . debug ( "error while updateing timestamp" + e ) ; } }
watchAction method is called from StartWatch to update the time interval
 It maintains a Map<AdapterInstance,TimeStamp> and updates accordingly
 upon every client(adpter) request
watchAction method is called from StartWatch to update the time interval It maintains a Map<AdapterInstance TimeStamp > and updates accordingly upon every client ( adpter ) request