Get the type of network connection that the device is currently using
to connect to the internet.

@return The type of network connection that the device is currently using.
178477
public NetworkConnectionType getCurrentConnectionType() {
        NetworkInfo activeNetworkInfo = getActiveNetworkInfo();

        if (activeNetworkInfo == null || !isInternetAccessAvailable()) {
            return NetworkConnectionType.NO_CONNECTION;
        }
        switch (activeNetworkInfo.getType()) {
            case ConnectivityManager.TYPE_WIFI:
                return NetworkConnectionType.WIFI;
            case ConnectivityManager.TYPE_MOBILE:
                return NetworkConnectionType.MOBILE;
            case ConnectivityManager.TYPE_WIMAX:
                return NetworkConnectionType.WIMAX;
            case ConnectivityManager.TYPE_ETHERNET:
                return NetworkConnectionType.ETHERNET;
            default:
                return NetworkConnectionType.NO_CONNECTION;
        }
    }
558698
private MBeanServerConnection getNetworkConnection() {
        try {
            JMXServiceURL url = new JMXServiceURL(getEndpointConfiguration().getServerUrl());
            String[] creds = {getEndpointConfiguration().getUsername(), getEndpointConfiguration().getPassword()};
            JMXConnector networkConnector = JMXConnectorFactory.connect(url, Collections.singletonMap(JMXConnector.CREDENTIALS, creds));
            connectionId = networkConnector.getConnectionId();

            networkConnector.addConnectionNotificationListener(this, null, null);
            return networkConnector.getMBeanServerConnection();
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to connect to network MBean server", e);
        }
    }
791668
public SICoreConnection getSICoreConnection() throws IllegalStateException {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "getSICoreConnection");
        }

        if (_sessionClosed) {
            throw new IllegalStateException(NLS.getFormattedMessage(
                    ("ILLEGAL_STATE_CWSJR1123"),
                    new Object[] { "getSICoreConnection"}, null));
        }
        if (_sessionInvalidated) {
            throw new IllegalStateException(NLS.getFormattedMessage(
                    ("ILLEGAL_STATE_CWSJR1124"),
                    new Object[] { "getSICoreConnection"}, null));
        }

        SICoreConnection coreConnection = null;
        if (_connection != null) {
            coreConnection = _connection.getSICoreConnection();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "getSICoreConnection", coreConnection);
        }
        return coreConnection;

    }
7763
public synchronized NetworkServiceRecordAgent getNetworkServiceRecordAgent() {
    if (this.networkServiceRecordAgent == null) {
      if (isService) {
        this.networkServiceRecordAgent =
            new NetworkServiceRecordAgent(
                this.serviceName,
                this.projectId,
                this.sslEnabled,
                this.nfvoIp,
                this.nfvoPort,
                this.version,
                this.serviceKey);
      } else {
        this.networkServiceRecordAgent =
            new NetworkServiceRecordAgent(
                this.username,
                this.password,
                this.projectId,
                this.sslEnabled,
                this.nfvoIp,
                this.nfvoPort,
                this.version);
      }
    }
    return this.networkServiceRecordAgent;
  }
485204
public String getContentType() {
    if (contentType != null) {
      return contentType;
    }

    if (dataStream != null) {
      try {
        contentType = URLConnection.guessContentTypeFromStream(dataStream);
      } catch (IOException ioe) {
        // ignore exception
      }
    }

    if (data != null) {
      contentType = URLConnection.guessContentTypeFromName(filename);
    }

    // fallback - if we have no contenttype and cannot detect one, use 'application/octet-stream'
    if (contentType == null) {
      contentType = "application/octet-stream";
    }

    return contentType;
  }
1028708
public Connection getConnection() throws IOException {
		Connection conn = null;
		if (this.datasource != null) {
			try {
				conn = this.datasource.getConnection();
			} catch (SQLException e) {
				throw new IOException(e);
			}
		}
		return conn;
	}
424096
public static Socket getCurrentSocket() {
        ConnectionHandler handler = connectionMap.get(Thread.currentThread());
        return (handler == null ? null : handler.getSocket());
    }
734475
public static boolean isWifiConnected(Context context) {
        ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
        return networkInfo != null && networkInfo.getType() == ConnectivityManager.TYPE_WIFI;
    }
405016
public String type() {
		try {
			if(isCluster(groupName)){
				return getBinaryJedisClusterCommands(groupName).type(keyBytes);
			}
			return getBinaryJedisCommands(groupName).type(keyBytes);
		} finally {
			getJedisProvider(groupName).release();
		}

	}
1335483
public function getType()
    {
        $rawType = $this->data[192];
        $type = ord($rawType);
        return Type::getByValue($type);
    }
1373918
public String getType() {
		if (this.type == null)
			this.type = this.resultHandler.getRelationType(getId(), this.rowIndex);
		return this.type;
	}
451477
public java.util.List<String> getNetworkLoadBalancerArns() {
        if (networkLoadBalancerArns == null) {
            networkLoadBalancerArns = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return networkLoadBalancerArns;
    }
1168268
public java.util.List<TerminateConnectionStatus> getConnectionStatuses() {
        if (connectionStatuses == null) {
            connectionStatuses = new com.amazonaws.internal.SdkInternalList<TerminateConnectionStatus>();
        }
        return connectionStatuses;
    }
905989
@Override
    public int getRemotePort() {
        int port = this.connection.getRemotePort();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getRemotePort: " + port);
        }
        return port;
    }
942596
public List<ConnectionInfo> getConnections() {
    final URI uri = uriWithPath("./connections/");
    return Arrays.asList(this.rt.getForObject(uri, ConnectionInfo[].class));
  }
188246
public static boolean isCurrentConnectionWifi(Context context) {
    ConnectivityManager cm =
        (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
    if (cm == null) {
      return false;
    }
    NetworkInfo info = cm.getActiveNetworkInfo();
    return info != null && info.getType() == ConnectivityManager.TYPE_WIFI;
  }
44147
public State getWifiState() {
		if (connMan == null) {
			connMan = (ConnectivityManager) context
					.getSystemService(Context.CONNECTIVITY_SERVICE);
		}
		NetworkInfo wifiNetworkInfo = connMan.getNetworkInfo(TYPE_WIFI);
		if (wifiNetworkInfo == null) {
			return State.UNKNOWN;
		}

		return wifiNetworkInfo.getState();
	}