com.twitterapime.platform
Class PlatformProviderSelector

java.lang.Object
  extended by com.twitterapime.platform.PlatformProviderSelector

public final class PlatformProviderSelector
extends java.lang.Object

This class is responsible for managing the platform providers available in this API, besides defining which one is current one. The definition of which platform provide is the selected will indicate which underlying implementation will provide all the services provided by this API.

Platform Provider selector always defines a given platform provider by default, however, the developer can select another one.

Since:
1.0
Version:
1.1
Author:
Ernandes Mourao Junior (ernandes@gmail.com)
See Also:
PlatformProvider

Method Summary
static PlatformProvider[] getAvailableProviders()
           Get all the platform providers supported by this API.
static PlatformProvider getCurrentProvider()
           Get the current platform provider which is providing all the services of this API.
static PlatformProvider getDefaultProvider()
           Get the default platform provider suggested by Platform Provider selector.
static void select(PlatformProvider pp)
           Set the given platform provider object as the current platform that will provide the services available in this API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAvailableProviders

public static PlatformProvider[] getAvailableProviders()

Get all the platform providers supported by this API.

Returns:
Array with platform providers.

getCurrentProvider

public static PlatformProvider getCurrentProvider()

Get the current platform provider which is providing all the services of this API.

Returns:
The current platform provider object.

getDefaultProvider

public static PlatformProvider getDefaultProvider()

Get the default platform provider suggested by Platform Provider selector.

Returns:
The default platform provider object.

select

public static void select(PlatformProvider pp)

Set the given platform provider object as the current platform that will provide the services available in this API.

Parameters:
pp - The platform provider object.
Throws:
java.lang.IllegalArgumentException - If pp is null.


Copyright © 2010 Twitter API ME Team. All Rights Reserved.