Package org.restlet.resource

Examples of org.restlet.resource.Finder


     *            The next server resource.
     */
    public Server(Protocol protocol, String address,
            Class<? extends ServerResource> nextClass) {
        this((Context) null, protocol, address, protocol.getDefaultPort(),
                new Finder(Context.getCurrent(), nextClass));
    }
View Full Code Here


        } else if (!uriPattern.startsWith("/")) {
            uriPattern = "/" + uriPattern;
            currentResource.setPath(uriPattern);
        }

        Finder finder = createFinder(router, uriPattern, currentResource);
        if (finder != null) {
            // Attach the resource itself
            router.attach(uriPattern, finder);
        }
View Full Code Here

     * @throws ClassNotFoundException
     */
    @SuppressWarnings("unchecked")
    protected Finder createFinder(Router router, String uriPattern,
            ResourceInfo resourceInfo) throws ClassNotFoundException {
        Finder result = null;

        if (resourceInfo.getIdentifier() != null) {
            // The "id" attribute conveys the target class name
            Class<? extends ServerResource> targetClass = (Class<? extends ServerResource>) Engine
                    .loadClass(resourceInfo.getIdentifier());
View Full Code Here

        return router;
    }

    private Finder createFinder( Class<? extends ServerResource> resource )
    {
        Finder finder = module.newObject( Finder.class );
        finder.setTargetClass( resource );
        return finder;
    }
View Full Code Here

TOP

Related Classes of org.restlet.resource.Finder

Copyright © 2018 www.massapicom. 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.