Package org.restlet

Examples of org.restlet.Context


    }

    //Update the plugin information
    public static void putPlugin(CookieSetting cS, int nodeId, MarketPlacePlugin plugin) {

        Client client = new Client(new Context(), Protocol.HTTP);
        client.getContext().getParameters().add("use ForwardedForHeader", "false");
        ClientResource pluginResource = new ClientResource(DRUPALPATH + "/rest/node/" + nodeId);
        pluginResource.setNext(client);
        pluginResource.getRequest().getCookies().add(cS);
        //the only data needed to update a plugin is the node, type, and field_os
View Full Code Here


    //Uploads a new file on the drupal site
    public static String postFile(CookieSetting cS, String pathName, String name) throws IOException {
        //TODO: check what happens when the file already exists
        // Instantiate the client connector, and configure it.
        Client client = new Client(new Context(), Protocol.HTTP);
        client.getContext().getParameters().add("use ForwardedForHeader", "false");

        ClientResource testFileResource = new ClientResource(DRUPALPATH + "/rest/file");

        testFileResource.setNext(client);
View Full Code Here

    public RestletProducer(RestletEndpoint endpoint) throws Exception {
        super(endpoint);
        this.throwException = endpoint.isThrowExceptionOnFailure();
        client = new Client(endpoint.getProtocol());
        client.setContext(new Context());
    }
View Full Code Here

    private Client client;

    public RestletProducer(RestletEndpoint endpoint) throws Exception {
        super(endpoint);
        client = new Client(endpoint.getProtocol());
        client.setContext(new Context());
    }
View Full Code Here

        + _zkAddress);

    _component = new Component();

    _component.getServers().add(Protocol.HTTP, _localWebservicePort);
    Context applicationContext = _component.getContext().createChildContext();
    applicationContext.getAttributes().put(SERVER, this);
    applicationContext.getAttributes().put(PORT, "" + _localWebservicePort);
    ZkPropertyTransferApplication application =
        new ZkPropertyTransferApplication(applicationContext);
    // Attach the application to the component and start it
    _component.getDefaultHost().attach(application);
    _timer = new Timer(true);
View Full Code Here

    public RestletProducer(RestletEndpoint endpoint) throws Exception {
        super(endpoint);
        this.throwException = endpoint.isThrowExceptionOnFailure();
        client = new Client(endpoint.getProtocol());
        client.setContext(new Context());
    }
View Full Code Here

    public RestletProducer(RestletEndpoint endpoint) throws Exception {
        super(endpoint);
        this.throwException = endpoint.isThrowExceptionOnFailure();
        client = new Client(endpoint.getProtocol());
        client.setContext(new Context());
    }
View Full Code Here

    public RestletProducer(RestletEndpoint endpoint) throws Exception {
        super(endpoint);
        this.throwException = endpoint.isThrowExceptionOnFailure();
        client = new Client(endpoint.getProtocol());
        client.setContext(new Context());
        client.getContext().getParameters().add("socketTimeout", String.valueOf(endpoint.getSocketTimeout()));
        client.getContext().getParameters().add("socketConnectTimeoutMs", String.valueOf(endpoint.getSocketTimeout()));
    }
View Full Code Here

    public RestletProducer(RestletEndpoint endpoint) throws Exception {
        super(endpoint);
        this.throwException = endpoint.isThrowExceptionOnFailure();
        client = new Client(endpoint.getProtocol());
        client.setContext(new Context());
    }
View Full Code Here

   
    protected class RestApplication extends Application {
        protected Context context;
       
        public RestApplication() {
            super(new Context());
            this.context = getContext();
        }
View Full Code Here

TOP

Related Classes of org.restlet.Context

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.