com.stackmob.sdkapi
Interface SDKServiceProvider


public interface SDKServiceProvider

Provides access to the various StackMob services.


Method Summary
 DataService getDataService()
          Get the DataService required to access the datastore for the current application.
 DatastoreService getDatastoreService()
          Deprecated. 
 FacebookService getFacebookService()
          Get the FacebookService required to communicate with Facebook for the current application.
 LoggerService getLoggerService(Class clazz)
          Get a LoggerService named corresponding to the given class.
 LoggerService getLoggerService(String name)
          Get a LoggerService named using the given name.
 PushService getPushService()
          Get the PushService required to send push notifications for the current application.
 TwitterService getTwitterService()
          Get the TwitterService required to communicate with Twitter for the current application.
 String getVersion()
          StackMob internally assigns a globally unique version string to every custom code JAR.
 boolean isSandbox()
          Determine whether this custom code instance is currently running in sandbox.
 

Method Detail

getLoggerService

LoggerService getLoggerService(Class clazz)
Get a LoggerService named corresponding to the given class. Use this for logging within custom code.

Parameters:
clazz - the logger service will be named after clazz
Returns:
the logger service

getLoggerService

LoggerService getLoggerService(String name)
Get a LoggerService named using the given name. Use this for logging within custom code.

Parameters:
name - the name of the logger service
Returns:
the logger service

getDatastoreService

@Deprecated
DatastoreService getDatastoreService()
Deprecated. 

Get the DatastoreService required to access the datastore for the current application.

Returns:
the datastore service

getDataService

DataService getDataService()
Get the DataService required to access the datastore for the current application.

Returns:
the data service

getPushService

PushService getPushService()
                           throws ServiceNotActivatedException
Get the PushService required to send push notifications for the current application.

Returns:
the push service
Throws:
ServiceNotActivatedException - if the push service has not yet been set up for the current application

getTwitterService

TwitterService getTwitterService()
                                 throws ServiceNotActivatedException
Get the TwitterService required to communicate with Twitter for the current application.

Returns:
the Twitter service
Throws:
ServiceNotActivatedException - if the Twitter service has not yet been set up for the current application

getFacebookService

FacebookService getFacebookService()
                                   throws ServiceNotActivatedException
Get the FacebookService required to communicate with Facebook for the current application.

Returns:
the Facebook service
Throws:
ServiceNotActivatedException - if the Facebook service has not yet been set up for the current application

isSandbox

boolean isSandbox()
Determine whether this custom code instance is currently running in sandbox.

Returns:
true if currently running in sandbox, false otherwise

getVersion

String getVersion()
StackMob internally assigns a globally unique version string to every custom code JAR. This method allows you to read that version string.

Returns:
the current version of this custom code JAR


Copyright © 2012 StackMob. All Rights Reserved.