Examples of NotificationType


Examples of de.hpi.eworld.observer.NotificationType

    if (arg instanceof ObserverNotification) {

      // cast notification and type.
      final ObserverNotification notification = (ObserverNotification) arg;
      final NotificationType type = notification.getType();

      logger.debug("Received notification: " + type.toString());
      switch (type) {
      case exportSuccessful:
        exportSuccessful();
        finished();
      case convertSuccessful:
        convertSuccessful();
        break;
      case convertFailed:
        convertFailed((String) notification.getObj1());
        break;
      case netFileSuccessful:
        netFileSuccessful();
        break;
      case netFileFailed:
        netFileFailed((String) notification.getObj1());
        break;
      case rouFileSuccessful:
        rouFileSuccessful();
        break;
      case rouFileFailed:
        rouFileFailed((String) notification.getObj1());
        break;
      case cfgFileSuccessful:
        cfgFileSuccessful();
        break;
      case cfgFileFailed:
        cfgFileFailed((String) notification.getObj1());
        break;
      case tlsFileSuccessful:
        tlsFileSuccessful();
        break;
      case tlsFileFailed:
        tlsFileFailed((String) notification.getObj1());
        break;
      case addFileSuccessful:
        addFileSuccessful();
        break;
      case addFileFailed:
        addFileFailed((String) notification.getObj1());
        break;
      case sumoFilesSavedTo:
        break;
      default:
        final Throwable stack = new RuntimeException();
        logger.warn("Recieved unexpected notification type: " + type.toString(), stack);
      }

    } else {

      // if argument was not handled until now, it is of unknown type.
View Full Code Here

Examples of de.hpi.eworld.observer.NotificationType

    importThread.addObserver(new Observer() {
      @Override
      public void update(Observable o, Object arg) {
        if (arg instanceof ObserverNotification) {
          final ObserverNotification notification = (ObserverNotification) arg;
          final NotificationType type = notification.getType();
         
          if (type.equals(NotificationType.sumoDumpThreadDone)) {
            threadDone();
          }
        }
      }
    });
    importThread.addObserver(new Observer() {
      @Override
      public void update(Observable o, Object arg) {
        if (arg instanceof ObserverNotification) {
          final ObserverNotification notification = (ObserverNotification) arg;
          final NotificationType type = notification.getType();
         
          if (type.equals(NotificationType.sumoDumpThreadFailed)) {
            threadFailed();
          }
        }
      }
    });
View Full Code Here

Examples of de.hpi.eworld.observer.NotificationType

    dialog.observable.addObserver(new Observer() {
      @Override
      public void update(Observable o, Object arg) {
        if (arg instanceof ObserverNotification) {
          final ObserverNotification notification = (ObserverNotification) arg;
          final NotificationType type = notification.getType();
         
          if (type.equals(NotificationType.dataImported)) {
            dialog.observable.notifyObservers(new ObserverNotification(NotificationType.importSuccessful));
          }
        }
      }
    });
View Full Code Here

Examples of de.hpi.eworld.observer.NotificationType

      dump.addObserver(new Observer() {
        @Override
        public void update(Observable o, Object arg) {
          if (arg instanceof ObserverNotification) {
            final ObserverNotification notification = (ObserverNotification) arg;
            final NotificationType type = notification.getType();
           
            if (type.equals(NotificationType.sumoDump2ModelProgress)) {
              progress((Integer) arg);
            }
          }
        }
      });
View Full Code Here

Examples of de.hpi.eworld.observer.NotificationType

   */
  @Override
  public void update(Observable o, Object arg) {
    if (arg != null && arg instanceof ObserverNotification) {
      ObserverNotification notification = (ObserverNotification) arg;
      NotificationType type = notification.getType();

      switch (type) {
        case modelCleared:
          createCity();
          break;
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.rpc.NotificationType

    public Map<NotificationType, NotificationInterval> getNotificationDelays(final String user) {
        //FIXME: everything on this path can be null
        final Collection<PropertyValue> valueCollection = MetaProjectManager.getManager().getMetaProject().getUser(user).getPropertyValues();
        final Map<NotificationType, NotificationInterval> returnValue = new HashMap<NotificationType, NotificationInterval>();
        for (PropertyValue propertyValue : valueCollection) {
            final NotificationType type = NotificationType.fromString(propertyValue.getPropertyName());
            if (type != null) {
                returnValue.put(type, NotificationInterval.fromString(propertyValue.getPropertyValue()));
            }
        }
        return returnValue;
View Full Code Here

Examples of games.stendhal.common.NotificationType

    poisoned = false;
  }

  // Called when entity listen to text from talker
  public void onPrivateListen(final String texttype, final String text) {
    NotificationType type;
    try {
      type = NotificationType.valueOf(texttype);
    } catch (final RuntimeException e) {
      LOGGER.error("Unkown texttype: ", e);
      type = NotificationType.PRIVMSG;
View Full Code Here

Examples of games.stendhal.common.NotificationType

        for (final RPEvent event : object.events()) {
          if (event.getName().equals("private_text")) {

            // private chat
            String text = event.get("text");
            NotificationType type;
            try {
              type = NotificationType.valueOf(event.get("texttype"));
            } catch (final RuntimeException e) {
              type = NotificationType.PRIVMSG;
            }
View Full Code Here

Examples of net.sf.libgrowl.NotificationType

        mApplication = new Application("TV-Browser");
        File icon = new File(TVBROWSER_ICON_NAME);
        if (icon.isFile()) {
          mApplication.setIcon(icon.getAbsolutePath());
        }
        mNotificationProgram = new NotificationType("program_notification",
            mLocalizer.msg(
            "notification", "program notification"));
        final NotificationType[] notificationTypes = new NotificationType[] { mNotificationProgram };
        mGrowlConnector.register(mApplication, notificationTypes);
        mInitialized = true;
View Full Code Here

Examples of org.apache.airavata.workflow.tracking.client.NotificationType

                xc.dispose();
            } catch (XmlException e) {
                logger.error("error parsing message content: " + messageContent, e);
                e.printStackTrace();
            }
            NotificationType type = MessageUtil.getType(messageObj);
            this.callback.deliverMessage(topic, type, messageObj);

        } else {
            logger.warn("Notification came without a Notification Topic:" + envelope);
        }
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.