org.apache.shindig.common
Class PropertiesModule

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

public class PropertiesModule
extends com.google.inject.AbstractModule

Injects everything from the a property file as a Named value Uses the default shindig.properties file if no other is provided


Constructor Summary
PropertiesModule()
           
PropertiesModule(Properties properties)
           
PropertiesModule(String propertyFile)
           
 
Method Summary
protected  void configure()
           
protected static String getDefaultPropertiesPath()
           
protected  Properties getProperties()
           
protected  String getServerHostname()
           
protected  String getServerPort()
          Should return the port that the current server is running on.
 
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
 

Constructor Detail

PropertiesModule

public PropertiesModule()

PropertiesModule

public PropertiesModule(String propertyFile)

PropertiesModule

public PropertiesModule(Properties properties)
Method Detail

configure

protected void configure()
Specified by:
configure in class com.google.inject.AbstractModule

getServerPort

protected String getServerPort()
Should return the port that the current server is running on. Useful for testing and working out of the box configs. Looks for a port in system properties "shindig.port" then "jetty.port", if not set uses fixed value of "8080"

Returns:
an integer port number as a string.

getServerHostname

protected String getServerHostname()

getDefaultPropertiesPath

protected static String getDefaultPropertiesPath()

getProperties

protected Properties getProperties()


Copyright © 2007-2012. All Rights Reserved.