Package ch.rakudave.jnetmap.model.device

Examples of ch.rakudave.jnetmap.model.device.Device.addInterface()


      Logger.debug("Unable to find opposite", e);
    }
    if (aSwitch == null) { // create a switch if necessary
      aSwitch = new Host(Type.Switch);
      map.addVertex(aSwitch);
      aSwitch.addInterface(new TransparentIF(aSwitch, gToS, gatewayIF));
      map.addEdge(gToS, gateway, aSwitch);
    }
    final Device gw = gateway, sw = aSwitch;
    final NetworkIF gif = gatewayIF;
    for (final InetAddress address : hosts.keySet()) {
View Full Code Here


                d.setName(address.getHostName());
                PhysicalIF pif = new PhysicalIF(d, c, address.getHostAddress());
                  pif.setPingMethod(hosts.get(address));
                  pif.setSubnet(subnet.getInfo().getNetmask());
                  pif.setGateway(subnet.getInfo().getLowAddress());
                d.addInterface(pif);
                SNMP.inferProperties(d);
              sw.addInterface(new TransparentIF(sw, c, pif));
              map.addVertex(d);
              map.addEdge(c, d, sw);
            } else {
View Full Code Here

        boolean b = graph.addVertex(arg0);
        for (Pair<Device> p : connectors.keySet()) {
          Connection c = connectors.get(p);
          graph.addEdge(c, p);
          Device other = (p.getFirst().equals(arg0))?p.getSecond():p.getFirst();
          other.addInterface(oppositeIFs.get(c));
        }
        notifyListeners(new MapEvent(_this, Type.VERTEX_ADDED, arg0));
        arg0.addDeviceListener(_this);
        return b;
      }
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.