Interface ProtocolAdapterFactory<E extends ProtocolAdapterConfig>
-
public interface ProtocolAdapterFactory<E extends ProtocolAdapterConfig>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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default EconvertConfigObject(@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull Map<String,Object> config)@NotNull ProtocolAdaptercreateAdapter(@NotNull ProtocolAdapterInformation adapterInformation, @NotNull ProtocolAdapterInput<E> input)This method is called by HiveMQ Edge to create an instance of the adapter@NotNull Class<E>getConfigClass()A bean class that will be reflected upon by the framework to determine the structural requirements of the configuration associated with an adapter instance.@NotNull ProtocolAdapterInformationgetInformation()Returns Metadata related to the protocol adapter instance, including descriptions, iconography, categorisation et aldefault @NotNull Map<String,Object>unconvertConfigObject(@NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull ProtocolAdapterConfig config)
-
-
-
Method Detail
-
getInformation
@NotNull @NotNull ProtocolAdapterInformation 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 E convertConfigObject(@NotNull @NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull @NotNull Map<String,Object> config)
- Parameters:
objectMapper- the object mapper that converts the map to the actual configconfig- a map containing the configuration of the adapter- Returns:
- a parsed confif object for this adapter
-
unconvertConfigObject
@NotNull default @NotNull Map<String,Object> unconvertConfigObject(@NotNull @NotNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NotNull @NotNull ProtocolAdapterConfig 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
-
getConfigClass
@NotNull @NotNull Class<E> getConfigClass()
A bean class that will be reflected upon by the framework to determine the structural requirements of the configuration associated with an adapter instance. It is expected that the bean class supplied, be marked up with- Returns:
- The class that represents (and will encapsulate) the configuration requirements of the adapter \\@ModuleConfigField annotations.
-
-