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.ClientResponseCallbackNested 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, versionFields 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
ConstructorsConstructorDescriptionDefaultBulkApiClient(String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidabortJob(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) voidcloseJob(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) voidcreateBatch(InputStream batchStream, String jobId, ContentType contentTypeEnum, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) voidcreateBatchQuery(String jobId, String soqlQuery, ContentType jobContentType, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) voidcreateJob(JobInfo request, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) Creates a Bulk Jobprotected SalesforceExceptioncreateRestException(org.eclipse.jetty.client.Response response, InputStream responseContent) protected voiddoHttpRequest(org.eclipse.jetty.client.Request request, AbstractClientBase.ClientResponseCallback callback) voidgetAllBatches(String jobId, Map<String, List<String>> headers, BulkApiClient.BatchInfoListResponseCallback callback) voidgetBatch(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.BatchInfoResponseCallback callback) voidgetJob(String jobId, Map<String, List<String>> headers, BulkApiClient.JobInfoResponseCallback callback) voidgetQueryResult(String jobId, String batchId, String resultId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) voidgetQueryResultIds(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.QueryResultIdsCallback callback) voidgetRequest(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) voidgetResults(String jobId, String batchId, Map<String, List<String>> headers, BulkApiClient.StreamResponseCallback callback) protected voidsetAccessToken(org.eclipse.jetty.client.Request request) Methods inherited from class org.apache.camel.component.salesforce.internal.client.AbstractClientBase
doStart, doStop, getHttpClient, getRequest, getRequest, onLogin, onLogout, setAccessToken, setInstanceUrlMethods 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, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods 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: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.Request request) - Specified by:
setAccessTokenin classAbstractClientBase
-
doHttpRequest
protected void doHttpRequest(org.eclipse.jetty.client.Request request, AbstractClientBase.ClientResponseCallback callback) - Overrides:
doHttpRequestin classAbstractClientBase
-
createRestException
protected SalesforceException createRestException(org.eclipse.jetty.client.Response response, InputStream responseContent) - Overrides:
createRestExceptionin classAbstractClientBase
-