org.apache.camel.component.salesforce.internal.client
Class DefaultBulkApiClient

java.lang.Object
  extended by org.apache.camel.component.salesforce.internal.client.AbstractClientBase
      extended by org.apache.camel.component.salesforce.internal.client.DefaultBulkApiClient
All Implemented Interfaces:
BulkApiClient, SalesforceSession.SalesforceSessionListener, org.apache.camel.Service

public class DefaultBulkApiClient
extends AbstractClientBase
implements BulkApiClient


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.camel.component.salesforce.internal.client.AbstractClientBase
AbstractClientBase.ClientResponseCallback
 
Nested classes/interfaces inherited from interface org.apache.camel.component.salesforce.internal.client.BulkApiClient
BulkApiClient.BatchInfoListResponseCallback, BulkApiClient.BatchInfoResponseCallback, BulkApiClient.JobInfoResponseCallback, BulkApiClient.QueryResultIdsCallback, BulkApiClient.StreamResponseCallback
 
Field Summary
 
Fields inherited from class org.apache.camel.component.salesforce.internal.client.AbstractClientBase
accessToken, APPLICATION_JSON_UTF8, APPLICATION_XML_UTF8, httpClient, instanceUrl, log, session, version
 
Constructor Summary
DefaultBulkApiClient(String version, SalesforceSession session, org.eclipse.jetty.client.HttpClient httpClient)
           
 
Method Summary
 void abortJob(String jobId, BulkApiClient.JobInfoResponseCallback callback)
           
 void closeJob(String jobId, BulkApiClient.JobInfoResponseCallback callback)
           
 void createBatch(InputStream batchStream, String jobId, ContentType contentTypeEnum, BulkApiClient.BatchInfoResponseCallback callback)
           
 void createBatchQuery(String jobId, String soqlQuery, ContentType jobContentType, BulkApiClient.BatchInfoResponseCallback callback)
           
 void createJob(JobInfo request, BulkApiClient.JobInfoResponseCallback callback)
          Creates a Bulk Job
protected  SalesforceException createRestException(org.eclipse.jetty.client.ContentExchange request)
           
protected  void doHttpRequest(org.eclipse.jetty.client.ContentExchange request, AbstractClientBase.ClientResponseCallback callback)
           
 void getAllBatches(String jobId, BulkApiClient.BatchInfoListResponseCallback callback)
           
 void getBatch(String jobId, String batchId, BulkApiClient.BatchInfoResponseCallback callback)
           
 void getJob(String jobId, BulkApiClient.JobInfoResponseCallback callback)
           
 void getQueryResult(String jobId, String batchId, String resultId, BulkApiClient.StreamResponseCallback callback)
           
 void getQueryResultIds(String jobId, String batchId, BulkApiClient.QueryResultIdsCallback callback)
           
 void getRequest(String jobId, String batchId, BulkApiClient.StreamResponseCallback callback)
           
 void getResults(String jobId, String batchId, BulkApiClient.StreamResponseCallback callback)
           
protected  void setAccessToken(org.eclipse.jetty.client.HttpExchange httpExchange)
           
 
Methods inherited from class org.apache.camel.component.salesforce.internal.client.AbstractClientBase
getContentExchange, onLogin, onLogout, setAccessToken, setInstanceUrl, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBulkApiClient

public DefaultBulkApiClient(String version,
                            SalesforceSession session,
                            org.eclipse.jetty.client.HttpClient httpClient)
                     throws SalesforceException
Throws:
SalesforceException
Method Detail

createJob

public void createJob(JobInfo request,
                      BulkApiClient.JobInfoResponseCallback callback)
Description copied from interface: BulkApiClient
Creates a Bulk Job

Specified by:
createJob in interface BulkApiClient
Parameters:
request - JobInfo with required fields
callback - BulkApiClient.JobInfoResponseCallback to be invoked on response or error

getJob

public void getJob(String jobId,
                   BulkApiClient.JobInfoResponseCallback callback)
Specified by:
getJob in interface BulkApiClient

closeJob

public void closeJob(String jobId,
                     BulkApiClient.JobInfoResponseCallback callback)
Specified by:
closeJob in interface BulkApiClient

abortJob

public void abortJob(String jobId,
                     BulkApiClient.JobInfoResponseCallback callback)
Specified by:
abortJob in interface BulkApiClient

createBatch

public void createBatch(InputStream batchStream,
                        String jobId,
                        ContentType contentTypeEnum,
                        BulkApiClient.BatchInfoResponseCallback callback)
Specified by:
createBatch in interface BulkApiClient

getBatch

public void getBatch(String jobId,
                     String batchId,
                     BulkApiClient.BatchInfoResponseCallback callback)
Specified by:
getBatch in interface BulkApiClient

getAllBatches

public void getAllBatches(String jobId,
                          BulkApiClient.BatchInfoListResponseCallback callback)
Specified by:
getAllBatches in interface BulkApiClient

getRequest

public void getRequest(String jobId,
                       String batchId,
                       BulkApiClient.StreamResponseCallback callback)
Specified by:
getRequest in interface BulkApiClient

getResults

public void getResults(String jobId,
                       String batchId,
                       BulkApiClient.StreamResponseCallback callback)
Specified by:
getResults in interface BulkApiClient

createBatchQuery

public void createBatchQuery(String jobId,
                             String soqlQuery,
                             ContentType jobContentType,
                             BulkApiClient.BatchInfoResponseCallback callback)
Specified by:
createBatchQuery in interface BulkApiClient

getQueryResultIds

public void getQueryResultIds(String jobId,
                              String batchId,
                              BulkApiClient.QueryResultIdsCallback callback)
Specified by:
getQueryResultIds in interface BulkApiClient

getQueryResult

public void getQueryResult(String jobId,
                           String batchId,
                           String resultId,
                           BulkApiClient.StreamResponseCallback callback)
Specified by:
getQueryResult in interface BulkApiClient

setAccessToken

protected void setAccessToken(org.eclipse.jetty.client.HttpExchange httpExchange)
Specified by:
setAccessToken in class AbstractClientBase

doHttpRequest

protected void doHttpRequest(org.eclipse.jetty.client.ContentExchange request,
                             AbstractClientBase.ClientResponseCallback callback)
Overrides:
doHttpRequest in class AbstractClientBase

createRestException

protected SalesforceException createRestException(org.eclipse.jetty.client.ContentExchange request)
Specified by:
createRestException in class AbstractClientBase


Apache Camel