/** * Generated by Dragonfly SDK * */ package com.buglabs.app.bugdash2.servicetracker; import java.io.IOException; import java.net.Inet4Address; import java.net.UnknownHostException; import org.osgi.framework.BundleContext; import com.buglabs.app.bugdash2.AdminConfigManager; import com.buglabs.app.bugdash2.App; import com.buglabs.app.bugdash2.LogManager; import com.buglabs.app.bugdash2.ShellManager; import com.buglabs.app.bugdash2.utils.Utils; /** * Service tracker for the BugApp Bundle; * */ public class BUGwebAdminServiceTracker { public BUGwebAdminServiceTracker(BundleContext context) { LogManager.setContext(context); ShellManager.setContext(context); AdminConfigManager.setContext(context); } public static boolean checkNetworkConnection() { boolean _connected = false; try { // check bugcommunity.com: change this later.. _connected = Utils.checkInternetConnection(Inet4Address.getByName(App.COMMUNITY_URL), 80, 3000); } catch (UnknownHostException e) { LogManager.logDebug(e.getMessage()); } catch (IOException e) { LogManager.logDebug(e.getMessage()); } catch (Exception e) { LogManager.logDebug(e.getMessage()); } return _connected; } }