Class AasPartRegistry
java.lang.Object
de.iip_ecosphere.platform.support.iip_aas.AasPartRegistry
public class AasPartRegistry extends Object
A registry for
AasContributor instances to be loaded via the Java Service loader.- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields Modifier and Type Field Description private static de.iip_ecosphere.platform.support.EndpointaasEndpointstatic StringDEFAULT_ENDPOINTstatic de.iip_ecosphere.platform.support.EndpointDEFAULT_EPstatic StringDEFAULT_HOSTstatic intDEFAULT_PORTstatic de.iip_ecosphere.platform.support.SchemaDEFAULT_SCHEMAstatic StringNAME_AASThe name of the top-level AAS created by this registry inbuild().static StringURN_AASThe URN of the top-level AAS created by this registry inbuild(). -
Constructor Summary
Constructors Constructor Description AasPartRegistry() -
Method Summary
Modifier and Type Method Description static List<de.iip_ecosphere.platform.support.aas.Aas>build()Build up all AAS of the currently running platform part.static Set<Class<? extends AasContributor>>contributorClasses()Returns the contributor classes.static Iterator<AasContributor>contributors()Returns the contributors.static de.iip_ecosphere.platform.support.Serverdeploy(List<de.iip_ecosphere.platform.support.aas.Aas> aas)Deploy the given AAS to a local server.static de.iip_ecosphere.platform.support.aas.AasgetAas(List<de.iip_ecosphere.platform.support.aas.Aas> list, String idShort)Returns the first AAS inlistmatching the given name.private static ServiceLoader<AasContributor>getContributorLoader()Returns the contributor loader.static de.iip_ecosphere.platform.support.aas.AasretrieveIipAas()Obtains the IIP-Ecosphere platform AAS.static voidsetAasEndpoint(de.iip_ecosphere.platform.support.Endpoint endpoint)Defines the AAS endpoint.
-
Field Details
-
NAME_AAS
The name of the top-level AAS created by this registry inbuild().- See Also:
- Constant Field Values
-
URN_AAS
The URN of the top-level AAS created by this registry inbuild().- See Also:
- Constant Field Values
-
DEFAULT_SCHEMA
public static final de.iip_ecosphere.platform.support.Schema DEFAULT_SCHEMA -
DEFAULT_HOST
- See Also:
- Constant Field Values
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
- Constant Field Values
-
DEFAULT_ENDPOINT
- See Also:
- Constant Field Values
-
DEFAULT_EP
public static final de.iip_ecosphere.platform.support.Endpoint DEFAULT_EP -
aasEndpoint
private static de.iip_ecosphere.platform.support.Endpoint aasEndpoint
-
-
Constructor Details
-
AasPartRegistry
public AasPartRegistry()
-
-
Method Details
-
setAasEndpoint
public static void setAasEndpoint(de.iip_ecosphere.platform.support.Endpoint endpoint)Defines the AAS endpoint.- Parameters:
endpoint- the registry endpoint
-
getContributorLoader
Returns the contributor loader.- Returns:
- the loader instance
-
contributors
Returns the contributors.- Returns:
- the contributors
-
contributorClasses
Returns the contributor classes.- Returns:
- the contributor classes
-
build
Build up all AAS of the currently running platform part. [public for testing]- Returns:
- the list of AAS
-
retrieveIipAas
Obtains the IIP-Ecosphere platform AAS. Be careful with the returned instance, as if the AAS is modified in the mean time, you may hold an outdated instance.- Returns:
- the platform AAS (may be null for none)
- Throws:
IOException- if the AAS cannot be read due to connection errors
-
deploy
public static de.iip_ecosphere.platform.support.Server deploy(List<de.iip_ecosphere.platform.support.aas.Aas> aas)Deploy the given AAS to a local server. [preliminary]- Parameters:
aas- the list of aas, e.g., frombuild()- Returns:
- the server instance
-
getAas
public static de.iip_ecosphere.platform.support.aas.Aas getAas(List<de.iip_ecosphere.platform.support.aas.Aas> list, String idShort)Returns the first AAS inlistmatching the given name. [utility]- Parameters:
list- the list to consideridShort- the short name to filter for- Returns:
- the first AAS or null for none
-