com.twitter.common.application
Class AbstractApplication

java.lang.Object
  extended by com.twitter.common.application.AbstractApplication
All Implemented Interfaces:
Application, Runnable
Direct Known Subclasses:
AngryBirdZooKeeperMain

public abstract class AbstractApplication
extends Object
implements Application

A base application class that provides empty implementations of all but the Runnable.run() method.


Constructor Summary
AbstractApplication()
           
 
Method Summary
 Iterable<? extends Module> getModules()
          Returns binding modules for the application.
 Iterable<? extends Module> getOverridingModules()
          Returns an iterable containing modules that should override bindings made in the rest of the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

AbstractApplication

public AbstractApplication()
Method Detail

getModules

public Iterable<? extends Module> getModules()
Description copied from interface: Application
Returns binding modules for the application.

Specified by:
getModules in interface Application
Returns:
Application binding modules.

getOverridingModules

public Iterable<? extends Module> getOverridingModules()
Description copied from interface: Application
Returns an iterable containing modules that should override bindings made in the rest of the application. This is useful for providing custom bindings in place of system defaults.

Specified by:
getOverridingModules in interface Application
Returns:
Application override binding modules.