SelectorType
- The type which is used to select the dataDataType
- The type provided by this data sourcepublic interface DataSource<SelectorType,DataType>
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(SelectorType selector)
This method is called by the framework in order to determine if the DataSource is able to provide data based on the given
selector.
|
Iterable<DataType> |
getData(SelectorType selector)
Returns the data for the given selector.
|
Class<SelectorType> |
getSelectorType()
This method is called when a suitable DataSource is determined.
|
boolean canHandle(SelectorType selector)
getData(Object)
is called in order to obtain the data.
canHandle is only called if the the selector is compatible with the Class returned by getSelectorType()
.
Concrete data sources should rather extend AbstractDataSource
than implementing this interface directly.
selector
- the selector which is used to determine the data to be providedClass<SelectorType> getSelectorType()
Iterable<DataType> getData(SelectorType selector)
selector
- the selector which is used to determine the data to be providedCopyright © 2018–2019 b+m Informatik AG. All rights reserved.