public interface ConnectionFactoryLocator
ConnectionFactory
instances.
Supports lookup by providerId and by apiType.ConnectionFactory
Modifier and Type | Method and Description |
---|---|
<A> ConnectionFactory<A> |
getConnectionFactory(Class<A> apiType)
Lookup a ConnectionFactory by apiType; for example, FacebookApi.class.
|
ConnectionFactory<?> |
getConnectionFactory(String providerId)
Lookup a ConnectionFactory by providerId; for example, "facebook".
|
Set<String> |
registeredProviderIds()
Returns the set of providerIds for which a
ConnectionFactory is registered; for example, { "twitter", "facebook", "foursquare" }
Elements in this set can be passed to getConnectionFactory(String) to fetch a specific factory instance. |
ConnectionFactory<?> getConnectionFactory(String providerId)
providerId
- the provider ID used to look up the ConnectionFactory.<A> ConnectionFactory<A> getConnectionFactory(Class<A> apiType)
A
- the API binding typeapiType
- the Java type of the API binding used to lookup a matching ConnectionFactoryConnectionRepository.getPrimaryConnection(Class)
Set<String> registeredProviderIds()
ConnectionFactory
is registered; for example, { "twitter", "facebook", "foursquare" }
Elements in this set can be passed to getConnectionFactory(String)
to fetch a specific factory instance.