Package name.pehl.taoki.security

Source Code of name.pehl.taoki.security.HitchhikingComponent

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
                }
            };
        }
    }
}
TOP

Related Classes of name.pehl.taoki.security.HitchhikingComponent

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.