Package com.ericsson.ssa.config

Examples of com.ericsson.ssa.config.ConfigRuntimeException


                } else {
                    if (log.isLoggable(Level.CONFIG)) {
                        log.log(Level.CONFIG, "sip.common.config_annotations_no_javabean_property_setter",
                                method.getName());
                    }
                    throw new ConfigRuntimeException("sip.common.config_annotations_activation_failed_exception");
                }
            }
           
            return key;      
    }
View Full Code Here


                if (log.isLoggable(Level.CONFIG)) {
                    log.log(Level.CONFIG, "sip.common.config_annotations_in_compatable_method_signature",
                            new Object[] { method.getName(),
                            "arguments type must have have constructure with string argument" });
                }
                throw new ConfigRuntimeException("sip.common.config_annotations_activation_failed_exception");
            }
        } else {
            if (log.isLoggable(Level.CONFIG)) {
                log.log(Level.CONFIG, "sip.common.config_annotations_in_compatable_method_signature",
                        new Object[] { method.getName(),
                        "nr of arguments must be 1" });
            }
            throw new ConfigRuntimeException("sip.common.config_annotations_activation_failed_exception");
        }
        return propertyType;
    }
View Full Code Here

                case FAIL:
                    if (log.isLoggable(Level.SEVERE)) {
                        log.log(Level.SEVERE, "sip.common.config_annotations_FAIL_usage_on_missing_or_incompatible_value",
                            new Object[] { method.getName(), key, annotation.node() });
                    }
                    throw new ConfigRuntimeException("sip.common.config_annotations_FAIL_usage_exception");
                case WARN:
                    if (log.isLoggable(Level.WARNING)) {
                        log.log(Level.WARNING, "sip.common.config_annotations_WARN_usage_on_missing_or_incompatible_value",
                            new Object[] { method.getName(), key, annotation.node() });
                    }
View Full Code Here

                        if (log.isLoggable(Level.SEVERE)) {
                            log.log(Level.SEVERE, "sip.common.config_annotations_FAIL_usage_on_missing_or_incompatible_value",
                                new Object[] { method.getName(), key, annotation.node(), value });
              log.log(Level.SEVERE, ex.getMessage(), ex);
                        }
                        throw new ConfigRuntimeException("sip.common.config_annotations_FAIL_usage_exception");
                    case WARN:
                        done=true;
                        if (log.isLoggable(Level.WARNING)) {
                            log.log(Level.WARNING, "sip.common.config_annotations_WARN_usage_on_missing_or_incompatible_value",
                                new Object[] { method.getName(), key, annotation.node(), value });
View Full Code Here

    }

    public void processEvents() {
        List<ConfigEvent> currentEventQueue = tlEventQueue.get();

        ConfigRuntimeException troubles = null;
        if (currentEventQueue != null) {
            try {
               for (ConfigEvent event : currentEventQueue) {
                    if (log.isLoggable(Level.FINEST)) {
                        log.log(Level.FINEST, "processing event: [" +
                            event.getClass().getName() + ", " + event.getNode() +
                            "]");
                    }
                    try {
                        eventMulticaster.processEvent(event);
                    } catch(Exception e) {                       
                        //This catch may be to wide!
                        //Each event gets the opertunaty be handled and
                        //lokalize the effect of troublesome listeners.
                        if (troubles==null) {
                            troubles = new ConfigRuntimeException("Processing events failed for atleast one event.");
                        }
                        troubles.addCause(e);
                    }
                }
            } finally {
                currentEventQueue.clear();
                tlEventQueue.set(null);
View Full Code Here

        Map<ConfigChangeListener, List<String>> registryClone = null;
        synchronized(registry) {
            registryClone = new HashMap<ConfigChangeListener, List<String>>(registry);
        }
       
        ConfigRuntimeException troubles = null;
        for (Map.Entry<ConfigChangeListener, List<String>> entry : registryClone.entrySet()) {
            for (String pattern : entry.getValue()) {
                if (match(pattern, event)) {
                    if (log.isLoggable(Level.FINE)) {
                        log.log(Level.FINE, "processEvent    match :) for " +
                        event.getClass().getName() + " with " + pattern +
                        " and " + event.getNode());
                    }
                    try {
                        if (event instanceof ConfigAddEvent) {
                            entry.getKey().handleConfigEvent((ConfigAddEvent) event);
                        }

                        if (event instanceof ConfigUpdateEvent) {
                            entry.getKey().handleConfigEvent((ConfigUpdateEvent) event);
                        }

                        if (event instanceof ConfigRemoveEvent) {
                            entry.getKey().handleConfigEvent((ConfigRemoveEvent) event);
                        }
                    } catch(Exception e) {
                        //This catch may be to wide!
                        //Each listener gets the opertunaty to handle the event.
                        //It lokalizes the effect of troublesome listeners.
                        if (troubles==null) {
                            troubles = new ConfigRuntimeException("Muticasting event ["+
                                    event.getNode()+"] failed for atleast one listener");
                        }
                        troubles.addCause(e);
                    }
                } else {
                    if (log.isLoggable(Level.FINEST)) {
                        log.log(Level.FINEST, "processEvent no match :( for " +
                        event.getClass().getName() + " with " + pattern +
View Full Code Here

TOP

Related Classes of com.ericsson.ssa.config.ConfigRuntimeException

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.