Interface ProtocolAdapterFactory<E extends ProtocolSpecificAdapterConfig>
public interface ProtocolAdapterFactory<E extends ProtocolSpecificAdapterConfig>
The factory is responsible for constructing and managing the lifecycle of the various aspects of the adapter
sub-systems. We bind this to the configuration types to we can provide tightly coupled implementation instances
responsible for adapter management.
-
Method Summary
Modifier and TypeMethodDescriptionconvertConfigObject(@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull Map<String, Object> config, boolean writingEnabled) convertTagDefinitionObject(@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull Map<String, Object> tag) convertTagDefinitionObjects(@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull List<Map<String, Object>> tagList) createAdapter(@NotNull ProtocolAdapterInformation adapterInformation, @NotNull ProtocolAdapterInput<E> input) This method is called by HiveMQ Edge to create an instance of the adapterReturns Metadata related to the protocol adapter instance, including descriptions, iconography, categorisation et alunconvertConfigObject(@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull ProtocolSpecificAdapterConfig config)
-
Method Details
-
getInformation
Returns Metadata related to the protocol adapter instance, including descriptions, iconography, categorisation et al- Returns:
- the instance that provides the adapter information
-
createAdapter
@NotNull @NotNull ProtocolAdapter createAdapter(@NotNull @NotNull ProtocolAdapterInformation adapterInformation, @NotNull @NotNull ProtocolAdapterInput<E> input) This method is called by HiveMQ Edge to create an instance of the adapter- Parameters:
adapterInformation- the information on the adapterinput- wrapper object for various information for the adapter.- Returns:
- the protocol adapter instance
-
convertConfigObject
@NotNull default @NotNull ProtocolSpecificAdapterConfig convertConfigObject(@NotNull @NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull @NotNull Map<String, Object> config, boolean writingEnabled) - Parameters:
objectMapper- the object mapper that converts the map to the actual configconfig- a map containing the configuration of the adapter- Returns:
- a parsed config object for this adapter
-
convertTagDefinitionObjects
@NotNull default @NotNull List<? extends Tag> convertTagDefinitionObjects(@NotNull @NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull @NotNull List<Map<String, Object>> tagList) - Parameters:
objectMapper- the object mapper that converts the map to the actual tagtagList- a list of maps where each entry is a tag- Returns:
- a parsed tag object for this adapter
-
convertTagDefinitionObject
@NotNull default @NotNull Tag convertTagDefinitionObject(@NotNull @NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull @NotNull Map<String, Object> tag) - Parameters:
objectMapper- the object mapper that converts the map to the actual tagtag- a map that is a tag- Returns:
- a parsed tag object for this adapter
-
unconvertConfigObject
@NotNull default @NotNull Map<String,Object> unconvertConfigObject(@NotNull @NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull @NotNull ProtocolSpecificAdapterConfig config) - Parameters:
objectMapper- the object mapper that converts the actual config to a mapconfig- the config for this adapter- Returns:
- a map containing the configuration of the adapter
-