public class DataSourceTypeSupport extends Object
Constructor and Description |
---|
DataSourceTypeSupport() |
Modifier and Type | Method and Description |
---|---|
protected <C,T extends DataSourceTypeAdapter<? super C,?>> |
find(Collection<T> typeAdapters,
ValueCache<?> cache,
C connection)
Given a collection of type datapters, finds the one that can store
data in the cache given the channel information described in the
connection payload.
|
protected String |
formatMessage(ValueCache<?> cache,
Object connection,
int match,
List<? extends DataSourceTypeAdapter<?,?>> matchedConverters)
Formats the error message in case of not unique match.
|
protected <C,T extends DataSourceTypeAdapter<? super C,?>> T find(Collection<T> typeAdapters, ValueCache<?> cache, C connection)
C
- type of connection payloadT
- datasource specific type adapter typetypeAdapters
- a collection of type adapterscache
- the cache where to store the dataconnection
- the connection payloadprotected String formatMessage(ValueCache<?> cache, Object connection, int match, List<? extends DataSourceTypeAdapter<?,?>> matchedConverters)
cache
- the cache used for the matchconnection
- the connection payload used for the matchmatch
- the result of the matchmatchedConverters
- the matched converters; will either be 0 (no match)
or more than 1 (non unique match)Copyright © 2010–2015. All rights reserved.