Package ch.rakudave.jnetmap.net.status

Examples of ch.rakudave.jnetmap.net.status.Status.compareTo()


   */
  public void setStatus(NetworkIF netIF, Status status) {
    statusMap.put(netIF, status);
    Status newStatus = Status.UNKNOWN;
    for (Status s : statusMap.values()) {
      if (newStatus.compareTo(s) > 0) newStatus = s;
    }
    this.status = newStatus;
  }
 
  /**
 
View Full Code Here


  @Override
  public void updateStatus() {
    Status newStatus = Status.UNKNOWN;
    for (NetworkIF i : interfaces) {
      i.updateStatus();
      if (newStatus.compareTo(i.getStatus()) > 0 && !(i instanceof LogicalIF)) newStatus = i.getStatus();
    }
    if (!status.equals(newStatus)) {
      status = newStatus;
      lastStatusChange = new Date(System.currentTimeMillis());
      notifyListeners(new DeviceEvent(this, DeviceEvent.Type.STATUS_CHANGED, null));
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.