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
-
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
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
ConstructorDescriptionDefaultBulkApiClient
(String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoid
abortJob
(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) void
closeJob
(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) void
createBatch
(InputStream batchStream, String jobId, ContentType contentTypeEnum, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) void
createBatchQuery
(String jobId, String soqlQuery, ContentType jobContentType, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) void
createJob
(JobInfo request, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) Creates a Bulk Jobprotected SalesforceException
createRestException
(org.eclipse.jetty.client.api.Response response, InputStream responseContent) protected void
doHttpRequest
(org.eclipse.jetty.client.api.Request request, AbstractClientBase.ClientResponseCallback callback) void
getAllBatches
(String jobId, Map<String, List<String>> headers, BulkApiClient.BatchInfoListResponseCallback callback) void
getBatch
(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) void
getJob
(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) void
getQueryResult
(String jobId, String batchId, String resultId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) void
getQueryResultIds
(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.QueryResultIdsCallback callback) void
getRequest
(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) void
getResults
(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) protected void
setAccessToken
(org.eclipse.jetty.client.api.Request request) 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
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
DefaultBulkApiClient
public DefaultBulkApiClient(String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig) throws SalesforceException - Throws:
SalesforceException
-
-
Method Details
-
createJob
public void createJob(JobInfo request, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) Description copied from interface:BulkApiClient
Creates a Bulk Job- Specified by:
createJob
in interfaceBulkApiClient
- Parameters:
request
-JobInfo
with required fieldscallback
-BulkApiClient.JobInfoResponseCallback
to be invoked on response or error
-
getJob
public void getJob(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) - Specified by:
getJob
in interfaceBulkApiClient
-
closeJob
public void closeJob(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) - Specified by:
closeJob
in interfaceBulkApiClient
-
abortJob
public void abortJob(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) - Specified by:
abortJob
in interfaceBulkApiClient
-
createBatch
public void createBatch(InputStream batchStream, String jobId, ContentType contentTypeEnum, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) - Specified by:
createBatch
in interfaceBulkApiClient
-
getBatch
public void getBatch(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) - Specified by:
getBatch
in interfaceBulkApiClient
-
getAllBatches
public void getAllBatches(String jobId, Map<String, List<String>> headers, BulkApiClient.BatchInfoListResponseCallback callback) - Specified by:
getAllBatches
in interfaceBulkApiClient
-
getRequest
public void getRequest(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) - Specified by:
getRequest
in interfaceBulkApiClient
-
getResults
public void getResults(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) - Specified by:
getResults
in interfaceBulkApiClient
-
createBatchQuery
public void createBatchQuery(String jobId, String soqlQuery, ContentType jobContentType, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) - Specified by:
createBatchQuery
in interfaceBulkApiClient
-
getQueryResultIds
public void getQueryResultIds(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.QueryResultIdsCallback callback) - Specified by:
getQueryResultIds
in interfaceBulkApiClient
-
getQueryResult
public void getQueryResult(String jobId, String batchId, String resultId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) - Specified by:
getQueryResult
in interfaceBulkApiClient
-
setAccessToken
protected void setAccessToken(org.eclipse.jetty.client.api.Request request) - Specified by:
setAccessToken
in classAbstractClientBase
-
doHttpRequest
protected void doHttpRequest(org.eclipse.jetty.client.api.Request request, AbstractClientBase.ClientResponseCallback callback) - Overrides:
doHttpRequest
in classAbstractClientBase
-
createRestException
protected SalesforceException createRestException(org.eclipse.jetty.client.api.Response response, InputStream responseContent) - Overrides:
createRestException
in classAbstractClientBase
-