Package ch.rakudave.jnetmap.model.device

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


    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

Related Classes of ch.rakudave.jnetmap.model.device.DeviceEvent

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.