-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): NetworkStatusService API (#4344)
* 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
1 parent
c609fe8
commit f5a518b
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
.../org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/status/NetworkStatusService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
|
||
} |