class NetworkInterfaceValidator implements Validator<NetworkInterface> {

  @Override
  public boolean isValid(NetworkInterface networkInterface) {
    boolean isValid = false;

    try {
      isValid =
          networkInterface != null && !networkInterface.isLoopback() && networkInterface.isUp();
    } catch (SocketException e) {
      e.printStackTrace();
    }

    return isValid;
  }

  @Inject public  NetworkInterfaceValidator();

}