org.shredzone.flattr4j.spring
Class DefaultFlattrServiceFactory

java.lang.Object
  extended by org.shredzone.flattr4j.spring.DefaultFlattrServiceFactory
All Implemented Interfaces:
FlattrServiceFactory

public class DefaultFlattrServiceFactory
extends Object
implements FlattrServiceFactory

Default implementation of FlattrServiceFactory.

Author:
Richard "Shred" Körber

Constructor Summary
DefaultFlattrServiceFactory(ConsumerKey consumerKey)
          Creates a new DefaultFlattrServiceFactory with the given ConsumerKey.
DefaultFlattrServiceFactory(ConsumerKey consumerKey, AccessToken accessToken)
          Creates a new DefaultFlattrServiceFactory with the given ConsumerKey and AccessToken.
 
Method Summary
 FlattrAuthenticator getFlattrAuthenticator()
          Creates a new FlattrAuthenticator.
 FlattrService getFlattrService()
          Creates a new FlattrService instance, using a default access token.
 FlattrService getFlattrService(AccessToken at)
          Creates a new FlattrService instance.
 OpenService getOpenService()
          Creates a new OpenService instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFlattrServiceFactory

public DefaultFlattrServiceFactory(ConsumerKey consumerKey)
Creates a new DefaultFlattrServiceFactory with the given ConsumerKey.

Parameters:
consumerKey - ConsumerKey to be used by this factory

DefaultFlattrServiceFactory

public DefaultFlattrServiceFactory(ConsumerKey consumerKey,
                                   AccessToken accessToken)
Creates a new DefaultFlattrServiceFactory with the given ConsumerKey and AccessToken.

Parameters:
consumerKey - ConsumerKey to be used by this factory
accessToken - AccessToken to be used by this factory
Method Detail

getOpenService

public OpenService getOpenService()
Description copied from interface: FlattrServiceFactory
Creates a new OpenService instance.

Specified by:
getOpenService in interface FlattrServiceFactory
Returns:
OpenService instance. Each invocation creates a new instance.

getFlattrService

public FlattrService getFlattrService()
Description copied from interface: FlattrServiceFactory
Creates a new FlattrService instance, using a default access token. If no default access token is set, an exception will be thrown.

Specified by:
getFlattrService in interface FlattrServiceFactory
Returns:
FlattrService instance. Each invocation creates a new instance.

getFlattrService

public FlattrService getFlattrService(AccessToken at)
Description copied from interface: FlattrServiceFactory
Creates a new FlattrService instance.

Specified by:
getFlattrService in interface FlattrServiceFactory
Parameters:
at - AccessToken to be used by the FlattrService
Returns:
FlattrService instance. Each invocation creates a new instance.

getFlattrAuthenticator

public FlattrAuthenticator getFlattrAuthenticator()
Description copied from interface: FlattrServiceFactory
Creates a new FlattrAuthenticator.

Specified by:
getFlattrAuthenticator in interface FlattrServiceFactory
Returns:
FlattrAuthenticator instance. Each invocation creates a new instance.


Copyright © 2010-2012. All Rights Reserved.