Package fr.soleil.salsa.entity

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


                        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

            view.enableListener(config != null);
        }
    }

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

        }
        return result;
    }

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

        }
        refresh();
    }

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

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

        }
        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);
                    }
                }
            } catch (NumberFormatException nfe) {
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

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.