org.apache.shindig.gadgets
Class DefaultGuiceModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.apache.shindig.gadgets.DefaultGuiceModule
All Implemented Interfaces:
com.google.inject.Module

public class DefaultGuiceModule
extends com.google.inject.AbstractModule

Creates a module to supply all of the core gadget classes. Instead of subclassing this consider adding features to the multibindings for features and rpc handlers.


Field Summary
static ThreadFactory DAEMON_THREAD_FACTORY
           
 
Constructor Summary
DefaultGuiceModule()
           
 
Method Summary
protected  void configure()
          
protected  List<String> defaultFeatures(String features, Set<String> extended)
          Merges the features provided in shindig.properties with the extended features from multibinding
protected  void registerConfigContributors()
           
protected  void registerFeatureHandlers()
          Sets up the multibinding for extended feature resources
protected  void registerGadgetHandlers()
          Sets up multibinding for rpc handlers
 
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAEMON_THREAD_FACTORY

public static final ThreadFactory DAEMON_THREAD_FACTORY
Constructor Detail

DefaultGuiceModule

public DefaultGuiceModule()
Method Detail

configure

protected void configure()

Specified by:
configure in class com.google.inject.AbstractModule

registerGadgetHandlers

protected void registerGadgetHandlers()
Sets up multibinding for rpc handlers


registerConfigContributors

protected void registerConfigContributors()

registerFeatureHandlers

protected void registerFeatureHandlers()
Sets up the multibinding for extended feature resources


defaultFeatures

@Provides
protected List<String> defaultFeatures(String features,
                                                Set<String> extended)
Merges the features provided in shindig.properties with the extended features from multibinding

Parameters:
features - Comma separated string from shindig.properties key 'shindig.features.default'
extended - Set of paths/resources from plugins
Returns:
the merged, list of all features to load.


Copyright © 2007-2012. All Rights Reserved.