Class DefaultBulkApiClient
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.component.salesforce.internal.client.AbstractClientBase
-
- org.apache.camel.component.salesforce.internal.client.DefaultBulkApiClient
-
- All Implemented Interfaces:
AutoCloseable,BulkApiClient,HttpClientHolder,SalesforceSession.SalesforceSessionListener,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
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, loginConfig, session, version
-
-
Constructor Summary
Constructors Constructor Description DefaultBulkApiClient(String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig)
-
Method Summary
-
Methods inherited from class org.apache.camel.component.salesforce.internal.client.AbstractClientBase
doStart, doStop, getHttpClient, getRequest, getRequest, onLogin, onLogout, setAccessToken, setInstanceUrl
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
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, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig) throws SalesforceException
- Throws:
SalesforceException
-
-
Method Detail
-
createJob
public void createJob(JobInfo request, Map<String,List<String>> headers, BulkApiClient.JobInfoResponseCallback callback)
Description copied from interface:BulkApiClientCreates a Bulk Job- Specified by:
createJobin interfaceBulkApiClient- Parameters:
request-JobInfowith required fieldscallback-BulkApiClient.JobInfoResponseCallbackto be invoked on response or error
-
getJob
public void getJob(String jobId, Map<String,List<String>> headers, BulkApiClient.JobInfoResponseCallback callback)
- Specified by:
getJobin interfaceBulkApiClient
-
closeJob
public void closeJob(String jobId, Map<String,List<String>> headers, BulkApiClient.JobInfoResponseCallback callback)
- Specified by:
closeJobin interfaceBulkApiClient
-
abortJob
public void abortJob(String jobId, Map<String,List<String>> headers, BulkApiClient.JobInfoResponseCallback callback)
- Specified by:
abortJobin interfaceBulkApiClient
-
createBatch
public void createBatch(InputStream batchStream, String jobId, ContentType contentTypeEnum, Map<String,List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback)
- Specified by:
createBatchin interfaceBulkApiClient
-
getBatch
public void getBatch(String jobId, String batchId, Map<String,List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback)
- Specified by:
getBatchin interfaceBulkApiClient
-
getAllBatches
public void getAllBatches(String jobId, Map<String,List<String>> headers, BulkApiClient.BatchInfoListResponseCallback callback)
- Specified by:
getAllBatchesin interfaceBulkApiClient
-
getRequest
public void getRequest(String jobId, String batchId, Map<String,List<String>> headers, BulkApiClient.StreamResponseCallback callback)
- Specified by:
getRequestin interfaceBulkApiClient
-
getResults
public void getResults(String jobId, String batchId, Map<String,List<String>> headers, BulkApiClient.StreamResponseCallback callback)
- Specified by:
getResultsin interfaceBulkApiClient
-
createBatchQuery
public void createBatchQuery(String jobId, String soqlQuery, ContentType jobContentType, Map<String,List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback)
- Specified by:
createBatchQueryin interfaceBulkApiClient
-
getQueryResultIds
public void getQueryResultIds(String jobId, String batchId, Map<String,List<String>> headers, BulkApiClient.QueryResultIdsCallback callback)
- Specified by:
getQueryResultIdsin interfaceBulkApiClient
-
getQueryResult
public void getQueryResult(String jobId, String batchId, String resultId, Map<String,List<String>> headers, BulkApiClient.StreamResponseCallback callback)
- Specified by:
getQueryResultin interfaceBulkApiClient
-
setAccessToken
protected void setAccessToken(org.eclipse.jetty.client.api.Request request)
- Specified by:
setAccessTokenin classAbstractClientBase
-
doHttpRequest
protected void doHttpRequest(org.eclipse.jetty.client.api.Request request, AbstractClientBase.ClientResponseCallback callback)- Overrides:
doHttpRequestin classAbstractClientBase
-
createRestException
protected SalesforceException createRestException(org.eclipse.jetty.client.api.Response response, InputStream responseContent)
- Specified by:
createRestExceptionin classAbstractClientBase
-
-