Examples of DeviceEvent


Examples of ch.rakudave.jnetmap.device.DeviceEvent

  }
 
  @Override
  public void addDevice(Host item) {
    if (item != null && devices.add(item)) {
      notifyListeners(new ModelEvent(this, new DeviceEvent(item, DeviceEvent.Type.DEVICE_ADDED)));
    }
  }
View Full Code Here

Examples of ch.rakudave.jnetmap.device.DeviceEvent

  }

  @Override
  public void removeDevice(Device item) {
    if (devices.remove(item)) {
      notifyListeners(new ModelEvent(this, new DeviceEvent(item, DeviceEvent.Type.DEVICE_REMOVED)));
    }
  }
View Full Code Here

Examples of ch.rakudave.jnetmap.model.device.DeviceEvent

    if (e.getType() == Type.DEVICE_EVENT) {
      Logger.trace("Received DeviceEvent "+e);
      Scheduler.execute(new Runnable() {
        @Override
        public void run() {
          DeviceEvent ev = (DeviceEvent) e.getSubject();
          if (ev.getType() == DeviceEvent.Type.STATUS_CHANGED
              || ev.getType() == DeviceEvent.Type.INTERFACE_STATUS_CHANGED) {
            for (Notifier l : statusListeners) {
              try {
                l.statusChanged(ev, _this);
              } catch (Exception e2) {
                Logger.error("Unable to notify StatusListener "+l, e2);
View Full Code Here

Examples of ch.rakudave.jnetmap.model.device.DeviceEvent

    Status newStatus = method.getStatus(address);
    if (status != newStatus) {
      lastSeen = new Date(System.currentTimeMillis());
      status = newStatus;
      connection.setStatus(this, status);
      device.notifyListeners(new DeviceEvent(device, Type.INTERFACE_STATUS_CHANGED, this));
    }
  }
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.