|
Spring Social | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.social.connect.support.ConnectionFactoryRegistry
public class ConnectionFactoryRegistry
A registry for service provider connection factories
.
Implements ConnectionFactoryLocator
for locating registered factory instances.
Call addConnectionFactory(ConnectionFactory)
to add to this registry.
Constructor Summary | |
---|---|
ConnectionFactoryRegistry()
|
Method Summary | ||
---|---|---|
void |
addConnectionFactory(ConnectionFactory<?> connectionFactory)
Add a ConnectionFactory to this registry. |
|
|
getConnectionFactory(java.lang.Class<A> apiType)
Lookup a ConnectionFactory by apiType; for example, FacebookApi.class. |
|
ConnectionFactory<?> |
getConnectionFactory(java.lang.String providerId)
Lookup a ConnectionFactory by providerId; for example, "facebook". |
|
java.util.Set<java.lang.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 ConnectionFactoryLocator.getConnectionFactory(String) to fetch a specific factory instance. |
|
void |
setConnectionFactories(java.util.List<ConnectionFactory<?>> connectionFactories)
Set the group of service provider connection factories registered in this registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionFactoryRegistry()
Method Detail |
---|
public void addConnectionFactory(ConnectionFactory<?> connectionFactory)
ConnectionFactory
to this registry.
connectionFactory
- the connection factorypublic void setConnectionFactories(java.util.List<ConnectionFactory<?>> connectionFactories)
addConnectionFactory(ConnectionFactory)
.
connectionFactories
- the set of connection factories to registerpublic ConnectionFactory<?> getConnectionFactory(java.lang.String providerId)
ConnectionFactoryLocator
getConnectionFactory
in interface ConnectionFactoryLocator
public <A> ConnectionFactory<A> getConnectionFactory(java.lang.Class<A> apiType)
ConnectionFactoryLocator
getConnectionFactory
in interface ConnectionFactoryLocator
ConnectionRepository.getPrimaryConnection(Class)
public java.util.Set<java.lang.String> registeredProviderIds()
ConnectionFactoryLocator
ConnectionFactory
is registered; for example, { "twitter", "facebook", "foursquare" }
Elements in this set can be passed to ConnectionFactoryLocator.getConnectionFactory(String)
to fetch a specific factory instance.
registeredProviderIds
in interface ConnectionFactoryLocator
|
Spring Social | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |