package name.pehl.taoki.security;
import name.pehl.taoki.TestComponent;
import org.restlet.Application;
import com.google.inject.Injector;
/**
* @author $Author: harald.pehl $
* @version $Date: 2012-03-02 08:50:20 -0600 (Fri, 02 Mar 2012) $ $Revision: 219 $
*/
public class HitchhikingComponent extends TestComponent
{
private Injector injector;
public HitchhikingComponent(Injector injector)
{
super();
this.injector = injector;
}
@Override
protected void initialize()
{
if (application == null)
{
application = new Application();
}
if (router == null)
{
router = new SecureRouter(injector, application.getContext())
{
@Override
protected void attachRoutes()
{
// Routes will be attached later in the integration tests
}
};
}
}
}