Package fr.soleil.salsa.entity

Examples of fr.soleil.salsa.entity.IErrorStrategyItem


        }
        return result;
    }

    public void notifyStrategySelectedChanged(ErrorStrategyItemType esType, String value) {
        IErrorStrategyItem esItem = findErrorStrategyItem(esType);
        ErrorStrategyType errorStrategyType = ErrorStrategyType.valueOf(ErrorStrategyType.class,
                value);
        esItem.setStrategy(errorStrategyType);
        if (config != null) {
            config.setModified(true);
        }
    }
View Full Code Here


            config.setModified(true);
        }
    }

    public void notifyTimeBetweenRetriesChanged(ErrorStrategyItemType esType, String value) {
        IErrorStrategyItem esItem = findErrorStrategyItem(esType);
        try {
            double d = Double.parseDouble(value);
            esItem.setTimeBetweenRetries(d);
        }
        catch (NumberFormatException nfe) {
            view.setTimeBetweenRetries(esType, esItem.getTimeBetweenRetries());
        }
        if (config != null) {
            config.setModified(true);
        }
    }
View Full Code Here

            config.setModified(true);
        }
    }

    public void notifyRetryCountChanged(ErrorStrategyItemType esType, String value) {
        IErrorStrategyItem esItem = findErrorStrategyItem(esType);
        try {
            int n = Integer.parseInt(value);
            esItem.setRetryCount(n);
        }
        catch (NumberFormatException nfe) {
            view.setRetryCount(esType, esItem.getRetryCount());
        }
        if (config != null) {
            config.setModified(true);
        }
    }
View Full Code Here

            config.setModified(true);
        }
    }

    public void notifyTimeOutChanged(ErrorStrategyItemType esType, String value) {
        IErrorStrategyItem esItem = findErrorStrategyItem(esType);
        try {
            double d = Double.parseDouble(value);
            esItem.setTimeOut(d);
        }
        catch (NumberFormatException nfe) {
            view.setTimeOut(esType, esItem.getTimeOut());
        }
        if (config != null) {
            config.setModified(true);
        }
    }
View Full Code Here

                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
View Full Code Here

                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
View Full Code Here

                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
View Full Code Here

                        String[] categoriesStr = new String[] { "actuators", "sensors",
                                "timebases", "hooks" };

                        for (int i = 0; i < categoriesStr.length; i++) {
                            String cat = categoriesStr[i];
                            IErrorStrategyItem esi = categoriesESI[i];

                            double errorStrategyTimeOut = esi.getTimeOut();
                            int errorStrategyRetryCount = esi.getRetryCount();
                            double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                            int errorStrategyType = esi.getStrategy().ordinal();

                            // Time out.
                            scanServerProxy.write_attribute(new DeviceAttribute(cat + "TimeOut",
                                    errorStrategyTimeOut));
                            // Retry count.
View Full Code Here

                    String[] categoriesStr = new String[] { "actuators", "sensors", "timebases",
                            "hooks" };

                    for (int i = 0; i < categoriesStr.length; i++) {
                        String cat = categoriesStr[i];
                        IErrorStrategyItem esi = categoriesESI[i];

                        double errorStrategyTimeOut = esi.getTimeOut();
                        int errorStrategyRetryCount = esi.getRetryCount();
                        double errorStrategyRetryTimeOut = esi.getTimeBetweenRetries();
                        int errorStrategyType = esi.getStrategy().ordinal();

                        // Time out.
                        String catAttribute = cat + "TimeOut";
                        actionName = "write_attribute(\"" + catAttribute + "\","
                                + errorStrategyTimeOut + ")";
View Full Code Here

                    errorStrategy.getActuatorsErrorStrategy(),
                    errorStrategy.getSensorsErrorStrategy(),
                    errorStrategy.getTimebasesErrorStrategy(),
                    errorStrategy.getHooksErrorStrategy() };
            String cat = null;
            IErrorStrategyItem item = null;
            for (int i = 0; i < categoriesStr.length; i++) {
                cat = categoriesStr[i];
                item = categoriesESI[i];
                double timeOut = CurrentConfigurationParser.readTimeOut(scanServer, cat);
                int retryCount = CurrentConfigurationParser.readRetryCount(scanServer, cat);
                double retryTimeOut = CurrentConfigurationParser.readRetryTimeOut(scanServer, cat);
                int strategy = CurrentConfigurationParser.readErrorStrategy(scanServer, cat);

                item.setTimeOut(timeOut);
                item.setRetryCount(retryCount);
                item.setTimeBetweenRetries(retryTimeOut);
                item.setStrategy(getErrorStrategyType(strategy));
            }
        }
        // System.out.println("newConfig=" + newConfig);
        return newConfig;
    }
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.IErrorStrategyItem

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.