All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.restler.Service Maven / Gradle / Ivy

The newest version!
package org.restler;

import org.restler.client.CoreModule;
import org.restler.http.security.SecuritySession;

/**
 * A {@code Service} is a representation of a remote service, which holds session information and is able
 * to produce proxies for remote services from descriptions of those services. Supported service description
 * formats depend on which {@code org.restler.client.CoreModule} was specified for the 
 * {@code org.restler.Restler} that produced the given {@code Service}.
 */
public class Service {

    private final CoreModule coreModule;
    private final SecuritySession session;

    Service(CoreModule module, SecuritySession session) {
        this.coreModule = module;
        this.session = session;
    }


    public  C produceClient(Class controllerClass) {
        return coreModule.produceClient(controllerClass);
    }

    public void authorize() {
        session.authorize();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy