Class TraceToAasService.Converter
java.lang.Object
de.iip_ecosphere.platform.services.environment.services.TransportConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>
de.iip_ecosphere.platform.services.environment.services.TransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>
de.iip_ecosphere.platform.services.environment.services.TraceToAasService.Converter
- Enclosing class:
TraceToAasService
protected class TraceToAasService.Converter
extends TransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>
A configured transport to AAS converter for
TraceRecord.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested classes/interfaces inherited from class de.iip_ecosphere.platform.services.environment.services.TransportToAasConverter
TransportToAasConverter.AasWatcher, TransportToAasConverter.CleanupPredicate, TransportToAasConverter.TypeConverter, TransportToAasConverter.ValueConverterNested classes/interfaces inherited from class de.iip_ecosphere.platform.services.environment.services.TransportConverter
TransportConverter.ConverterInstances<T>, TransportConverter.Watcher<T> -
Field Summary
Fields inherited from class de.iip_ecosphere.platform.services.environment.services.TransportToAasConverter
ENUM_NAME_CONVERTER, IDENTITY_CONVERTER, JSON_CONVERTER, SHORT2INT_CONVERTER, STRING_CONVERTERFields inherited from class de.iip_ecosphere.platform.services.environment.services.TransportConverter
NAME_COLL_ENDPOINTS, NAME_PROP_HOST, NAME_PROP_PATH, NAME_PROP_PORT, NAME_PROP_SCHEMA, NAME_PROP_URI, PREFIX_GETTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancleanUpAas(de.iip_ecosphere.platform.support.aas.Aas aas) Cleans up the AAS.protected voiddoWatch(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection coll, long lastRun) Used inTransportToAasConverter<T>.AasWatcherto regularly watch the status entires.getAasId()Returns the AAS idShort of the AAS represented by this service/application.Returns the AAS URN of the AAS represented by this service/application.Returns the cleanup predicate.Returns a function turning a data instance into an id of the submodel representing the data instance.protected StringmapPayloadType(Class<?> cls) Allows for application specific payload type names.protected voidpopulateSubmodelElementCollection(de.iip_ecosphere.platform.support.aas.SubmodelElementContainerBuilder smcBuilder, de.iip_ecosphere.platform.transport.status.TraceRecord data) Creates the submodel element representing a single received data value.Methods inherited from class de.iip_ecosphere.platform.services.environment.services.TransportToAasConverter
addConverter, cleanup, cleanup, createPayloadEntries, createWatcher, getTimeout, handleNew, isAasStarted, isTraceInAas, setCleanupTimeout, setTimeout, start, stopMethods inherited from class de.iip_ecosphere.platform.services.environment.services.TransportConverter
addEndpointToAas, addNotifier, getEndpoint, getEndpoint, getEndpoint, getExcludedFieldsArray, getType, getValue, initializeSubmodel, isAasEnabled, isExcludedField, isGetter, setAasEnabledSupplier, setExcludedFields, setHandleNewFilter, toAasEndpointId
-
Constructor Details
-
Converter
public Converter()Creates a configured converter instance.
-
-
Method Details
-
getAasId
Description copied from class:TransportToAasConverterReturns the AAS idShort of the AAS represented by this service/application.- Specified by:
getAasIdin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Returns:
- the idShort
-
getAasUrn
Description copied from class:TransportToAasConverterReturns the AAS URN of the AAS represented by this service/application.- Specified by:
getAasUrnin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Returns:
- the URN
-
getSubmodelElementIdFunction
protected Function<de.iip_ecosphere.platform.transport.status.TraceRecord,String> getSubmodelElementIdFunction()Description copied from class:TransportToAasConverterReturns a function turning a data instance into an id of the submodel representing the data instance.- Specified by:
getSubmodelElementIdFunctionin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Returns:
- the function
-
getCleanupPredicate
Description copied from class:TransportToAasConverterReturns the cleanup predicate.- Specified by:
getCleanupPredicatein classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Returns:
- the predicate
-
cleanUpAas
protected boolean cleanUpAas(de.iip_ecosphere.platform.support.aas.Aas aas) Description copied from class:TransportToAasConverterCleans up the AAS. Last action, may delete the AAS itself. May not be called ifAAS enabled suppliersignals that there shall not be an AAS.- Overrides:
cleanUpAasin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Parameters:
aas- the AAS to clean up- Returns:
truefor success,falseelse
-
populateSubmodelElementCollection
protected void populateSubmodelElementCollection(de.iip_ecosphere.platform.support.aas.SubmodelElementContainerBuilder smcBuilder, de.iip_ecosphere.platform.transport.status.TraceRecord data) Description copied from class:TransportToAasConverterCreates the submodel element representing a single received data value.- Specified by:
populateSubmodelElementCollectionin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Parameters:
smcBuilder- the builder for the submodel element collection representing the data valuedata- the data that may be used to create the element
-
mapPayloadType
Description copied from class:TransportConverterAllows for application specific payload type names.- Overrides:
mapPayloadTypein classTransportConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Parameters:
cls- the type- Returns:
- the mapped name
-
doWatch
protected void doWatch(de.iip_ecosphere.platform.support.aas.SubmodelElementCollection coll, long lastRun) Description copied from class:TransportToAasConverterUsed inTransportToAasConverter<T>.AasWatcherto regularly watch the status entires.- Specified by:
doWatchin classTransportToAasConverter<de.iip_ecosphere.platform.transport.status.TraceRecord>- Parameters:
coll- the collection representing an entrylastRun- the last run of the watcher
-