Package org.restlet.resource

Examples of org.restlet.resource.Finder


    private ClientResource clientResource;

    protected void setUp() throws Exception {
        super.setUp();
        Finder finder = new Finder();
        finder.setTargetClass(MyResource2.class);

        this.clientResource = new ClientResource("http://local");
        this.clientResource.setNext(finder);
    }
View Full Code Here


    private ClientResource clientResource;

    protected void setUp() throws Exception {
        super.setUp();
        Finder finder = new Finder();
        finder.setTargetClass(MyResource6.class);

        this.clientResource = new ClientResource("http://local");
        this.clientResource.setNext(finder);
    }
View Full Code Here

     *
     * @param targetClass
     *            The target resource class to attach.
     */
    public void setNext(Class<? extends ServerResource> targetClass) {
        setNext(new Finder(getContext(), targetClass));
    }
View Full Code Here

     *
     * @param nextClass
     *            The next resource class to attach.
     */
    public void setNext(Class<? extends ServerResource> nextClass) {
        setNext(new Finder(getContext(), nextClass));
    }
View Full Code Here

        WadlServerResource wadl = null;

        log.info("Looking for a wadl resource");
        for (Restlet next = getNext(); next != null;) {
            if (next instanceof Finder) {
                Finder f = (Finder) next;
                ServerResource sr = f.find(request, response);
                if (sr instanceof WadlServerResource) {
                    wadl = (WadlServerResource) sr;
                }
                break;
                // next = ((Filter)next).getNext();
View Full Code Here

        Set<Method> methods = new HashSet<Method>();

        log.info("Looking for a scoped resource");
        for (Restlet next = getNext(); next != null;) {
            if (next instanceof Finder) {
                Finder f = (Finder) next;
                ServerResource sr = f.find(request, response);
                if (sr instanceof DiscoverableResource) {
                    scoped = (DiscoverableResource) sr;
                    List<AnnotationInfo> ai = AnnotationUtils.getAnnotations(sr
                            .getClass());
                    for (AnnotationInfo i : ai) {
View Full Code Here

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

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

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

     * @param nextClass
     *            The next server resource.
     */
    public Server(Protocol protocol, int port,
            Class<? extends ServerResource> nextClass) {
        this((Context) null, protocol, port, new Finder(Context.getCurrent(),
                nextClass));
    }
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.