Skip to content

Commit

Permalink
feat(api): NetworkStatusService API (#4344)
Browse files Browse the repository at this point in the history
* Added NetworkStatusService API

Signed-off-by: pierantoniomerlino <[email protected]>

* Removed trailing spaces

Signed-off-by: pierantoniomerlino <[email protected]>

Signed-off-by: pierantoniomerlino <[email protected]>
  • Loading branch information
pierantoniomerlino authored Jan 26, 2023
1 parent c609fe8 commit f5a518b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions kura/org.eclipse.kura.api/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Export-Package: org.eclipse.kura;version="1.7.0",
org.eclipse.kura.net.firewall;version="2.0.0",
org.eclipse.kura.net.modem;version="2.4.0",
org.eclipse.kura.net.route;version="1.0.2",
org.eclipse.kura.net.status;version="1.0.0",
org.eclipse.kura.net.wifi;version="2.3.0",
org.eclipse.kura.position;version="1.3.0",
org.eclipse.kura.security;version="1.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*******************************************************************************
* Copyright (c) 2023 Eurotech and/or its affiliates and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Eurotech
*
******************************************************************************/
package org.eclipse.kura.net.status;

import java.util.List;

import org.eclipse.kura.net.NetInterface;
import org.eclipse.kura.net.NetInterfaceAddress;
import org.osgi.annotation.versioning.ProviderType;

/**
* Service API for getting the network interfaces status.
*
* @noimplement This interface is not intended to be implemented by clients.
*/
@ProviderType
public interface NetworkStatusService {

/**
* Return the list of the {@link NetInterface} of all network
* interfaces detected in the system
*
* @return a list containing the status of all the network interfaces
*/
public List<NetInterface<NetInterfaceAddress>> getNetworkStatus();

/**
* Return the {@link NetInterface} of the given network interface
*
* @param interfaceName the name of the network interface
* @return the {@link NetInterface}
*/
public NetInterface<NetInterfaceAddress> getNetworkStatus(String interfaceName);

/**
* Return the names of the network interfaces detected in the system.
*
* @return a list containing the network interface names
*/
public List<String> getInterfaceNames();

}

0 comments on commit f5a518b

Please sign in to comment.