Examples of IErrorStrategyItem


Examples of fr.soleil.salsa.entity.IErrorStrategyItem

        }
        refresh();
    }

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

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

        }
        refresh();
    }

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

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                            errorStrat.getTimebasesErrorStrategy(), errorStrat.getHooksErrorStrategy() };
                    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 = writeAttributeLog(catAttribute, String.valueOf(errorStrategyTimeOut));
                        scanServerProxy.write_attribute(new DeviceAttribute(catAttribute, errorStrategyTimeOut));
View Full Code Here

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

            view.setStrategy(itemType, item.getStrategy().name());
        }
    }

    private IErrorStrategyItem findErrorStrategyItem(ErrorStrategyItemType esType) {
        IErrorStrategyItem result = null;
        if (esType == ErrorStrategyItemType.sensors) {
            result = errorStrategy.getSensorsErrorStrategy();
        }
        else if (esType == ErrorStrategyItemType.actuators) {
            result = errorStrategy.getActuatorsErrorStrategy();
View Full Code Here

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

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                value);
        esItem.setStrategy(errorStrategyType);
    }

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

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

            view.setTimeBetweenRetries(esType, esItem.getTimeBetweenRetries());
        }
    }

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

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

            view.setRetryCount(esType, esItem.getRetryCount());
        }
    }

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

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                    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

Examples of fr.soleil.salsa.entity.IErrorStrategyItem

                    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
TOP
Copyright © 2018 www.massapi.com. 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.