|
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.ConnectionFactory<A>
A
- the connection service API typepublic abstract class ConnectionFactory<A>
Base abstraction for factories that construct service provider Connection
instances.
Encapsulates the differences and knowledge of specific connection implementations, for example, the difference between OAuth1 and OAuth2 based connections.
Constructor Summary | |
---|---|
ConnectionFactory(java.lang.String providerId,
ServiceProvider<A> serviceProvider,
ApiAdapter<A> apiAdapter)
Creates a new ConnectionFactory. |
Method Summary | |
---|---|
abstract Connection<A> |
createConnection(ConnectionData data)
|
protected ApiAdapter<A> |
getApiAdapter()
Exposes the ApiAdapter to subclasses. |
java.lang.String |
getProviderId()
The unique id of the provider this factory creates connections to. |
protected ServiceProvider<A> |
getServiceProvider()
Exposes the ServiceProvider instance to subclasses. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionFactory(java.lang.String providerId, ServiceProvider<A> serviceProvider, ApiAdapter<A> apiAdapter)
providerId
- the assigned, unique id of the provider this factory creates connections to (used when indexing this factory in a registry)serviceProvider
- the model for the ServiceProvider used to conduct the connection authorization/refresh flow and obtain a native service API instanceapiAdapter
- the adapter that maps common operations exposed by the ServiceProvider's API to the uniform Connection
modelMethod Detail |
---|
public java.lang.String getProviderId()
ConnectionFactory
in a registry to support dynamic lookup operations.
ConnectionFactoryLocator.getConnectionFactory(String).
protected ServiceProvider<A> getServiceProvider()
protected ApiAdapter<A> getApiAdapter()
public abstract Connection<A> createConnection(ConnectionData data)
|
Spring Social | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |