Package org.jmanage.core.alert

Examples of org.jmanage.core.alert.AlertInfo


    /**
     * Removes the next element from the Map
     * @return next element if any, null otherwise
     */
    public AlertInfo remove(){
        AlertInfo alertInfo = null;
        synchronized(alerts){
            if(alerts.size() > 0){
                String alertId =
                        (String)alerts.keySet().iterator().next();
                alertInfo = (AlertInfo)alerts.remove(alertId);
View Full Code Here


        listener = new ObjectNotificationListener(){
            public void handleNotification(ObjectNotification notification,
                                           Object handback) {
                try {
                    NotificationAlertSource.this.handler.handle(
                            new AlertInfo(notification));
                } catch (Exception e) {
                    logger.log(Level.SEVERE, "Error while handling alert", e);
                }
            }
        };
View Full Code Here

        EmailDelivery delivery = new EmailDelivery();

        public void run(){
            while(true){
                AlertInfo alertInfo = EmailAlerts.this.remove();
                if(alertInfo != null){
                    // todo: if deliver method can return boolean on success
                    //    we can change this to process all queued alerts
                    delivery.deliver(alertInfo);
                }
View Full Code Here

    private class ApplicationDowntimeEventListener implements EventListener {
        public void handleEvent(EventObject event) {
            if(event instanceof ApplicationDownEvent &&
                    sourceConfig.getApplicationConfig().equals(
                            ((ApplicationDownEvent)event).getApplicationConfig())){
                handler.handle(new AlertInfo());
            }
        }
View Full Code Here

        listener = new ObjectNotificationListener(){
            public void handleNotification(ObjectNotification notification,
                                           Object handback) {
                try {
                    StringAlertSource.this.handler.handle(
                            new AlertInfo(notification));
                } catch (Exception e) {
                    logger.log(Level.SEVERE, "Error while handling alert", e);
                }
            }
        };
View Full Code Here

        listener = new ObjectNotificationListener(){
            public void handleNotification(ObjectNotification notification,
                                           Object handback) {
                try {
                    GaugeAlertSource.this.handler.handle(
                            new AlertInfo(notification));
                } catch (Exception e) {
                    logger.log(Level.SEVERE, "Error while handling alert", e);
                }
            }
        };
View Full Code Here

TOP

Related Classes of org.jmanage.core.alert.AlertInfo

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.