package net.peierls.restlet.util;

import com.google.inject.Key;

import org.restlet.Finder;
import org.restlet.Handler;

/**
 * Produces a Finder instance, given a Guice key or a Handler class, that
 * will obtain a Handler/Resource for that key or class.
 */
public interface FinderFactory {

    /**
     * Returns a Finder that will obtain an instance of Handler
     * bound to the given Key.
     */
    Finder finderFor(Key<? extends Handler> key);

    /**
     * Returns a Finder that will obtain an instance of Handler
     * bound to the given class.
     */
    Finder finderFor(Class<? extends Handler> cls);
}
