Class SimpleSourceConfig<I,E>
- java.lang.Object
-
- com.activeviam.risk.ref.source.dataloadcontroller.impl.SimpleSourceConfig<I,E>
-
- Type Parameters:
I
- type of the identifiers of messages.E
- type of the data elements appended into message chunks.
- All Implemented Interfaces:
ISourceConfig<I,E>
- Direct Known Subclasses:
SimpleCsvSourceConfig
,SimpleJdbcSourceConfig
public class SimpleSourceConfig<I,E> extends Object implements ISourceConfig<I,E>
A basic implementation ofISourceConfig
which usesSimpleSourceConfig.ITopicConfig
objects to describe each topic, and delegates the channel creation toIStoreMessageChannelFactory
via these topic config objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SimpleSourceConfig.ITopicConfig<I>
A Message Channel Factory for a topic.
-
Constructor Summary
Constructors Constructor Description SimpleSourceConfig(com.qfs.source.IStoreMessageChannelFactory<I,E> messageChannelFactory, com.activeviam.tools.dataloadcontroller.core.source.IFetchingDataSource<I,E> source, Map<String,SimpleSourceConfig.ITopicConfig<I>> topicConfigs)
Create a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.qfs.msg.IMessageChannel<I,E>
createChannel(String topic)
Create amessage channel
for the topic.com.activeviam.tools.dataloadcontroller.core.source.IFetchingDataSource<I,E>
getSource()
Collection<String>
getTargetStores(String topic)
The stores that are targeted by the topic.
-
-
-
Constructor Detail
-
SimpleSourceConfig
public SimpleSourceConfig(com.qfs.source.IStoreMessageChannelFactory<I,E> messageChannelFactory, com.activeviam.tools.dataloadcontroller.core.source.IFetchingDataSource<I,E> source, Map<String,SimpleSourceConfig.ITopicConfig<I>> topicConfigs)
Create a new instance- Parameters:
messageChannelFactory
- the message channel factory to create the base channelssource
- the source objecttopicConfigs
- a map of topics to topic configs
-
-
Method Detail
-
getSource
public com.activeviam.tools.dataloadcontroller.core.source.IFetchingDataSource<I,E> getSource()
- Specified by:
getSource
in interfaceISourceConfig<I,E>
- Returns:
- the source object that can be registered with
IDataLoadController
-
createChannel
public com.qfs.msg.IMessageChannel<I,E> createChannel(String topic)
Description copied from interface:ISourceConfig
Create amessage channel
for the topic.- Specified by:
createChannel
in interfaceISourceConfig<I,E>
- Parameters:
topic
- the topic to create the channel for- Returns:
- the message channel
-
getTargetStores
public Collection<String> getTargetStores(String topic)
Description copied from interface:ISourceConfig
The stores that are targeted by the topic. These stores are passed to theIDataLoadController.registerChannel()
when registering the topic's channel with the data load controller.- Specified by:
getTargetStores
in interfaceISourceConfig<I,E>
- Parameters:
topic
- the topic whose target stores are- Returns:
- the stores that may be written to when fetching the topic
- See Also:
ITuplePublisher.getTargetStores()
-
-