Package org.iosgi.outpost.util.ipr

Examples of org.iosgi.outpost.util.ipr.MacAddress


    IMachine m = session.getMachine();
    long count = 1;// vbox.getSystemProperties().getNetworkAdapterCount();
    for (long i = 0; i < count; i++) {
      INetworkAdapter a = m.getNetworkAdapter(i);
      String raw = a.getMACAddress();
      InetAddress addr = registry.get(new MacAddress(raw), 30,
          TimeUnit.SECONDS);
      addresses.add(addr);
    }
    return addresses;
  }
View Full Code Here


  public synchronized void destroy() throws IOException {
    URL url = virtualBox.getManagerUrl();
    final VirtualBoxManager vboxMgr = VirtualBoxManager
        .createInstance(null);
    vboxMgr.connect(url.toString(), "user", "pwd");
    MacAddress mac = null;
    for (Map.Entry<MacAddress, InterfaceAddress> e : MacAddress
        .getAddresses().entrySet()) {
      if (e.getValue().getAddress()
          .equals(Networking.getPrimaryAddress())) {
        mac = e.getKey();
      }
    }
    IVirtualBox vbox = vboxMgr.getVBox();
    for (final IMachine m : vbox.getMachines()) {
      MacAddress mmac = new MacAddress(m.getNetworkAdapter(0L)
          .getMACAddress());
      if (mmac.equals(mac)) {
        EXEC_SVC.submit(new Callable<Void>() {
          @Override
          public Void call() throws Exception {
            synchronized (OperatingSystemIE.this) {
              context.getBundle(0).stop();
View Full Code Here

TOP

Related Classes of org.iosgi.outpost.util.ipr.MacAddress

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.