Package org.eclipse.jetty.client

Examples of org.eclipse.jetty.client.ContentExchange


        });
    }

    @Override
    public void getRequest(String jobId, String batchId, final StreamResponseCallback callback) {
        final ContentExchange get = getContentExchange(HttpMethods.GET, batchUrl(jobId, batchId));

        // make the call and parse the result
        doHttpRequest(get, new ClientResponseCallback() {
            @Override
            public void onResponse(InputStream response, SalesforceException ex) {
View Full Code Here


        });
    }

    @Override
    public void getResults(String jobId, String batchId, final StreamResponseCallback callback) {
        final ContentExchange get = getContentExchange(HttpMethods.GET, batchResultUrl(jobId, batchId, null));

        // make the call and return the result
        doHttpRequest(get, new ClientResponseCallback() {
            @Override
            public void onResponse(InputStream response, SalesforceException ex) {
View Full Code Here

    }

    @Override
    public void createBatchQuery(String jobId, String soqlQuery, ContentType jobContentType,
        final BatchInfoResponseCallback callback) {
        final ContentExchange post = getContentExchange(HttpMethods.POST, batchUrl(jobId, null));
        byte[] queryBytes = soqlQuery.getBytes(StringUtil.__UTF8_CHARSET);
        post.setRequestContent(new ByteArrayBuffer(queryBytes));
        post.setRequestContentType(getContentType(jobContentType) + ";charset=" + StringUtil.__UTF8);

        // make the call and parse the result
        doHttpRequest(post, new ClientResponseCallback() {
            @Override
            public void onResponse(InputStream response, SalesforceException ex) {
View Full Code Here

        });
    }

    @Override
    public void getQueryResultIds(String jobId, String batchId, final QueryResultIdsCallback callback) {
        final ContentExchange get = getContentExchange(HttpMethods.GET, batchResultUrl(jobId, batchId, null));

        // make the call and parse the result
        doHttpRequest(get, new ClientResponseCallback() {
            @Override
            public void onResponse(InputStream response, SalesforceException ex) {
View Full Code Here

        });
    }

    @Override
    public void getQueryResult(String jobId, String batchId, String resultId, final StreamResponseCallback callback) {
        final ContentExchange get = getContentExchange(HttpMethods.GET, batchResultUrl(jobId, batchId, resultId));

        // make the call and parse the result
        doHttpRequest(get, new ClientResponseCallback() {
            @Override
            public void onResponse(InputStream response, SalesforceException ex) {
View Full Code Here

        return new SalesforceException("Unexpected error", httpExchange.getResponseStatus());
    }

    @Override
    public void getVersions(final ResponseCallback callback) {
        ContentExchange get = getContentExchange(HttpMethods.GET, servicesDataUrl());
        // does not require authorization token

        doHttpRequest(get, new DelegatingClientCallback(callback));
    }
View Full Code Here

        doHttpRequest(get, new DelegatingClientCallback(callback));
    }

    @Override
    public void getResources(ResponseCallback callback) {
        ContentExchange get = getContentExchange(HttpMethods.GET, versionUrl());
        // requires authorization token
        setAccessToken(get);

        doHttpRequest(get, new DelegatingClientCallback(callback));
    }
View Full Code Here

        doHttpRequest(get, new DelegatingClientCallback(callback));
    }

    @Override
    public void getGlobalObjects(ResponseCallback callback) {
        ContentExchange get = getContentExchange(HttpMethods.GET, sobjectsUrl(""));
        // requires authorization token
        setAccessToken(get);

        doHttpRequest(get, new DelegatingClientCallback(callback));
    }
View Full Code Here

    }

    @Override
    public void getBasicInfo(String sObjectName,
                             ResponseCallback callback) {
        ContentExchange get = getContentExchange(HttpMethods.GET, sobjectsUrl(sObjectName + "/"));
        // requires authorization token
        setAccessToken(get);

        doHttpRequest(get, new DelegatingClientCallback(callback));
    }
View Full Code Here

    }

    @Override
    public void getDescription(String sObjectName,
                               ResponseCallback callback) {
        ContentExchange get = getContentExchange(HttpMethods.GET, sobjectsUrl(sObjectName + "/describe/"));
        // requires authorization token
        setAccessToken(get);

        doHttpRequest(get, new DelegatingClientCallback(callback));
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.client.ContentExchange

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.