Class DefaultBulkApiV2Client
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.DefaultBulkApiV2Client
- All Implemented Interfaces:
AutoCloseable,BulkApiV2Client,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.BulkApiV2Client
BulkApiV2Client.JobResponseCallback, BulkApiV2Client.JobsResponseCallback, BulkApiV2Client.QueryJobResponseCallback, BulkApiV2Client.QueryJobsResponseCallback, BulkApiV2Client.ResponseCallback, BulkApiV2Client.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
ConstructorsConstructorDescriptionDefaultBulkApiV2Client(String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig, SalesforceEndpoint endpoint) -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeJobState(String jobId, JobStateEnum state, Map<String, List<String>> headers, BulkApiV2Client.JobResponseCallback callback) voidchangeQueryJobState(String jobId, JobStateEnum state, Map<String, List<String>> headers, BulkApiV2Client.QueryJobResponseCallback callback) voidcreateBatch(InputStream batchStream, String jobId, Map<String, List<String>> headers, BulkApiV2Client.ResponseCallback callback) voidvoidcreateQueryJob(QueryJob queryJob, Map<String, List<String>> headers, BulkApiV2Client.QueryJobResponseCallback callback) protected SalesforceExceptioncreateRestException(org.eclipse.jetty.client.api.Response response, InputStream responseContent) voiddeleteJob(String jobId, Map<String, List<String>> headers, BulkApiV2Client.ResponseCallback callback) voiddeleteQueryJob(String jobId, Map<String, List<String>> headers, BulkApiV2Client.ResponseCallback callback) protected voiddoHttpRequest(org.eclipse.jetty.client.api.Request request, AbstractClientBase.ClientResponseCallback callback) voidgetAllJobs(String queryLocator, Map<String, List<String>> headers, BulkApiV2Client.JobsResponseCallback callback) voidgetAllQueryJobs(String queryLocator, Map<String, List<String>> headers, BulkApiV2Client.QueryJobsResponseCallback callback) voidgetFailedResults(String jobId, Map<String, List<String>> headers, BulkApiV2Client.StreamResponseCallback callback) voidgetJob(String jobId, Map<String, List<String>> headers, BulkApiV2Client.JobResponseCallback callback) voidgetQueryJob(String jobId, Map<String, List<String>> headers, BulkApiV2Client.QueryJobResponseCallback callback) voidgetQueryJobResults(String jobId, String locator, Integer maxRecords, Map<String, List<String>> headers, BulkApiV2Client.StreamResponseCallback callback) voidgetSuccessfulResults(String jobId, Map<String, List<String>> headers, BulkApiV2Client.StreamResponseCallback callback) voidgetUnprocessedRecords(String jobId, Map<String, List<String>> headers, BulkApiV2Client.StreamResponseCallback callback) protected voidsetAccessToken(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, 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
-
DefaultBulkApiV2Client
public DefaultBulkApiV2Client(String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig, SalesforceEndpoint endpoint) throws SalesforceException - Throws:
SalesforceException
-
-
Method Details
-
createJob
public void createJob(Job job, Map<String, List<String>> headers, BulkApiV2Client.JobResponseCallback callback) - Specified by:
createJobin interfaceBulkApiV2Client
-
getJob
public void getJob(String jobId, Map<String, List<String>> headers, BulkApiV2Client.JobResponseCallback callback) - Specified by:
getJobin interfaceBulkApiV2Client
-
createBatch
public void createBatch(InputStream batchStream, String jobId, Map<String, List<String>> headers, BulkApiV2Client.ResponseCallback callback) - Specified by:
createBatchin interfaceBulkApiV2Client
-
changeJobState
public void changeJobState(String jobId, JobStateEnum state, Map<String, List<String>> headers, BulkApiV2Client.JobResponseCallback callback) - Specified by:
changeJobStatein interfaceBulkApiV2Client
-
deleteJob
public void deleteJob(String jobId, Map<String, List<String>> headers, BulkApiV2Client.ResponseCallback callback) - Specified by:
deleteJobin interfaceBulkApiV2Client
-
getSuccessfulResults
public void getSuccessfulResults(String jobId, Map<String, List<String>> headers, BulkApiV2Client.StreamResponseCallback callback) - Specified by:
getSuccessfulResultsin interfaceBulkApiV2Client
-
getFailedResults
public void getFailedResults(String jobId, Map<String, List<String>> headers, BulkApiV2Client.StreamResponseCallback callback) - Specified by:
getFailedResultsin interfaceBulkApiV2Client
-
getUnprocessedRecords
public void getUnprocessedRecords(String jobId, Map<String, List<String>> headers, BulkApiV2Client.StreamResponseCallback callback) - Specified by:
getUnprocessedRecordsin interfaceBulkApiV2Client
-
getAllJobs
public void getAllJobs(String queryLocator, Map<String, List<String>> headers, BulkApiV2Client.JobsResponseCallback callback) - Specified by:
getAllJobsin interfaceBulkApiV2Client
-
createQueryJob
public void createQueryJob(QueryJob queryJob, Map<String, List<String>> headers, BulkApiV2Client.QueryJobResponseCallback callback) - Specified by:
createQueryJobin interfaceBulkApiV2Client
-
getQueryJob
public void getQueryJob(String jobId, Map<String, List<String>> headers, BulkApiV2Client.QueryJobResponseCallback callback) - Specified by:
getQueryJobin interfaceBulkApiV2Client
-
getQueryJobResults
public void getQueryJobResults(String jobId, String locator, Integer maxRecords, Map<String, List<String>> headers, BulkApiV2Client.StreamResponseCallback callback) - Specified by:
getQueryJobResultsin interfaceBulkApiV2Client
-
changeQueryJobState
public void changeQueryJobState(String jobId, JobStateEnum state, Map<String, List<String>> headers, BulkApiV2Client.QueryJobResponseCallback callback) - Specified by:
changeQueryJobStatein interfaceBulkApiV2Client
-
deleteQueryJob
public void deleteQueryJob(String jobId, Map<String, List<String>> headers, BulkApiV2Client.ResponseCallback callback) - Specified by:
deleteQueryJobin interfaceBulkApiV2Client
-
getAllQueryJobs
public void getAllQueryJobs(String queryLocator, Map<String, List<String>> headers, BulkApiV2Client.QueryJobsResponseCallback callback) - Specified by:
getAllQueryJobsin interfaceBulkApiV2Client
-
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) - Overrides:
createRestExceptionin classAbstractClientBase
-
setAccessToken
protected void setAccessToken(org.eclipse.jetty.client.api.Request request) - Specified by:
setAccessTokenin classAbstractClientBase
-