public static interface SourceHandler.SourceServiceProperties.Builder
A new instance of such a builder can be created using
DiffusionGatewayFramework.newSourceServicePropertiesBuilder().
| Modifier and Type | Method and Description |
|---|---|
SourceHandler.SourceServiceProperties |
build()
Create a
SourceHandler.SourceServiceProperties instance with the
current settings of this builder. |
SourceHandler.SourceServiceProperties.Builder |
payloadConvertor(InboundPayloadConvertor<?,?> convertor)
Specifies an inbound payload convertor to use for converting
published values to Diffusion specific values.
|
SourceHandler.SourceServiceProperties.Builder |
payloadConvertorName(String name)
Specifies the name of an inbound payload convertor to use for
converting published values to Diffusion specific values.
|
SourceHandler.SourceServiceProperties.Builder |
topicType(TopicType type)
Sets the topic type.
|
SourceHandler.SourceServiceProperties.Builder |
updateMode(UpdateMode updateMode)
Sets the update mode to be used for topics published to by the
service.
|
SourceHandler.SourceServiceProperties.Builder topicType(TopicType type) throws InvalidConfigurationException
If this is not set the value will be decided by the
build() method according to whether a payload convertor
has been specified or not.
If payloadConvertorName(java.lang.String) or payloadConvertor has
already been specified, the topic type must be compatible with
the payload convertor.
type - the topic type. Setting to null removes any
previously specified topic typeInvalidConfigurationException - if the specified topic type
is incompatible with the previously specified payload
convertorSourceHandler.SourceServiceProperties.Builder payloadConvertorName(String name) throws InvalidConfigurationException
The named payload convertor must be one of those configured in
the inbound payload convertors configuration file (see
"Payload
Convertors").
If a topic type has already been specified, the payload convertor must be compatible with the topic type.
If a payload convertor is not specified for the builder then a
default one will be chosen by the build() method according
to whether a topic type has been specified or not.
One of the issued payload convertors defined in
InboundPayloadConvertor can be specified if required.
Alternatively one of the default convertors defined in
PayloadConvertor can be explicitly specified if required.
name - the inbound convertor name. Specifying null removes
any existing payload convertorInvalidConfigurationException - if an
inbound payload convertor
with the given name could not be found or the payload
convertor is incompatible with the specified topic typeSourceHandler.SourceServiceProperties.Builder payloadConvertor(InboundPayloadConvertor<?,?> convertor) throws InvalidConfigurationException
This method can be used instead of payloadConvertorName(java.lang.String)
in cases where there is no suitable convertor in the convertors
configuration or a service specific convertor needs to be
instantiated.
If a topic type has already been specified, the payload convertor must be compatible with the topic type.
If a payload convertor is not specified for the builder then a
default one will be chosen by the build() method according
to whether a topic type has been specified or not.
convertor - the inbound convertor. Specifying null removes
any existing payload convertorInvalidConfigurationException - if the payload convertor is
incompatible with the specified topic typeSourceHandler.SourceServiceProperties.Builder updateMode(UpdateMode updateMode)
The default, if not set is SIMPLE.
updateMode - the update modeSourceHandler.SourceServiceProperties build()
SourceHandler.SourceServiceProperties instance with the
current settings of this builder.
If no topic type has been specified, it will be derived from the
specified payload convertor and if no payload convertor has been
specified it will be assumed to be TopicType.JSON.
If no payload convertor is set standard conversions as described
in "Payload Convertors" will be used according to the chosen topic
type.
Copyright © 2023 DiffusionData Limited. All rights reserved.