com.twitter.common.testing
Class TearDownRegistry

java.lang.Object
  extended by com.twitter.common.testing.TearDownRegistry
All Implemented Interfaces:
ShutdownRegistry

public class TearDownRegistry
extends Object
implements ShutdownRegistry

An action registry suitable for use as a shutdownRegistry in tests that extend TearDownTestCase.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.twitter.common.application.ShutdownRegistry
ShutdownRegistry.ShutdownRegistryImpl
 
Constructor Summary
TearDownRegistry(com.google.common.testing.TearDownAccepter tearDownAccepter)
          Creates a new tear down registry that delegates execution of shutdown actions to a tearDownAccepter.
 
Method Summary
<E extends Exception,T extends ExceptionalCommand<E>>
void
addAction(T action)
          Adds an action to the shutdown registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TearDownRegistry

public TearDownRegistry(com.google.common.testing.TearDownAccepter tearDownAccepter)
Creates a new tear down registry that delegates execution of shutdown actions to a tearDownAccepter.

Parameters:
tearDownAccepter - A tear down accepter that will be used to register shutdown actions with.
Method Detail

addAction

public <E extends Exception,T extends ExceptionalCommand<E>> void addAction(T action)
Description copied from interface: ShutdownRegistry
Adds an action to the shutdown registry.

Specified by:
addAction in interface ShutdownRegistry
Type Parameters:
E - Exception type thrown by the action.
T - Type of command.
Parameters:
action - Action to register.