Class MacIdProvider
java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.MacIdProvider
- All Implemented Interfaces:
IdProvider
A MAC-based device ID provider.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImplements the provider descriptor. -
Field Summary
Fields inherited from interface de.iip_ecosphere.platform.support.iip_aas.IdProvider
ID_PARAM_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAddress(NetworkInterface ni, List<String> addresses) Adds the hardware address ofnitoaddressesif possible.booleanReturns whether the console parameter "--"iip.id"" may override the value of this provider.Returns the id of this device.
-
Constructor Details
-
MacIdProvider
public MacIdProvider()
-
-
Method Details
-
provideId
Description copied from interface:IdProviderReturns the id of this device. As the ID is also used as shortId in the platform AAS, it may be that the AAS implementation adjusts the ID to comply with the AAS id rules. Thus, it may be adequate that the returned ID already complies with these rules, e.g., must start with a character.- Specified by:
provideIdin interfaceIdProvider- Returns:
- the id, may be null if for some reason the ID cannot be provided and a fallback shall be used
-
addAddress
Adds the hardware address ofnitoaddressesif possible.- Parameters:
ni- the network interfaceaddresses- the list of addresses to be modified as a side effect
-
allowsConsoleOverride
public boolean allowsConsoleOverride()Description copied from interface:IdProviderReturns whether the console parameter "--"iip.id"" may override the value of this provider.- Specified by:
allowsConsoleOverridein interfaceIdProvider- Returns:
truefor override,falseelse
-