Example #1
0
 private void wakeupEthernetAddresses(String address, InetAddress host, int port)
     throws IllegalEthernetAddressException {
   try {
     EthernetAddress ethernetAddress = new EthernetAddress(address);
     WakeUpUtil.wakeup(ethernetAddress, host, port);
   } catch (IOException e) {
     System.err.println(
         Messages.ERROR_MESSAGES.getFormattedString(
             "wakeup.io", host.toString(), String.valueOf(port)));
   }
 }
Example #2
0
 private void wakeupConfig(Machine host) {
   try {
     EthernetAddress ethernetAddress = new EthernetAddress(host.getEthernetAddress());
     InetAddress hostAddress = InetAddress.getByName(host.getHost());
     WakeUpUtil.wakeup(ethernetAddress, hostAddress, host.getPort());
   } catch (IOException e) {
     System.err.println(
         Messages.ERROR_MESSAGES.getFormattedString(
             "wakeup.io", host.getHost(), String.valueOf(host.getPort())));
   } catch (IllegalEthernetAddressException e) {
     // should not happen
     System.err.println(
         Messages.ERROR_MESSAGES.getFormattedString(
             "wakeup.invalidEthernetAddress", host.getHost(), String.valueOf(host.getPort())));
   }
 }