Class DefaultCompositeApiClient
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.DefaultCompositeApiClient
- All Implemented Interfaces:
AutoCloseable
,CompositeApiClient
,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.CompositeApiClient
CompositeApiClient.Operation<T,
R>, CompositeApiClient.ResponseCallback<T> -
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
ConstructorDescriptionDefaultCompositeApiClient
(SalesforceEndpointConfig configuration, String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
setAccessToken
(org.eclipse.jetty.client.api.Request request) void
submitComposite
(SObjectComposite composite, Map<String, List<String>> headers, CompositeApiClient.ResponseCallback<SObjectCompositeResponse> callback) void
submitCompositeBatch
(SObjectBatch batch, Map<String, List<String>> headers, CompositeApiClient.ResponseCallback<SObjectBatchResponse> callback) void
submitCompositeRaw
(InputStream raw, Map<String, List<String>> headers, CompositeApiClient.ResponseCallback<InputStream> callback, String compositeMethod) void
submitCompositeTree
(SObjectTree tree, Map<String, List<String>> headers, CompositeApiClient.ResponseCallback<SObjectTreeResponse> callback) Submits given nodes (records) of SObjects and their children as a tree in a single request.Methods inherited from class org.apache.camel.component.salesforce.internal.client.AbstractClientBase
createRestException, doHttpRequest, 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
-
DefaultCompositeApiClient
public DefaultCompositeApiClient(SalesforceEndpointConfig configuration, String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig) throws SalesforceException - Throws:
SalesforceException
-
-
Method Details
-
submitCompositeRaw
public void submitCompositeRaw(InputStream raw, Map<String, List<String>> headers, CompositeApiClient.ResponseCallback<InputStream> callback, String compositeMethod) throws SalesforceException- Specified by:
submitCompositeRaw
in interfaceCompositeApiClient
- Throws:
SalesforceException
-
submitComposite
public void submitComposite(SObjectComposite composite, Map<String, List<String>> headers, CompositeApiClient.ResponseCallback<SObjectCompositeResponse> callback) throws SalesforceException- Specified by:
submitComposite
in interfaceCompositeApiClient
- Throws:
SalesforceException
-
submitCompositeBatch
public void submitCompositeBatch(SObjectBatch batch, Map<String, List<String>> headers, CompositeApiClient.ResponseCallback<SObjectBatchResponse> callback) throws SalesforceException- Specified by:
submitCompositeBatch
in interfaceCompositeApiClient
- Throws:
SalesforceException
-
submitCompositeTree
public void submitCompositeTree(SObjectTree tree, Map<String, List<String>> headers, CompositeApiClient.ResponseCallback<SObjectTreeResponse> callback) throws SalesforceExceptionDescription copied from interface:CompositeApiClient
Submits given nodes (records) of SObjects and their children as a tree in a single request. And updates theId
parameter of each object to the value returned from the API call.- Specified by:
submitCompositeTree
in interfaceCompositeApiClient
- Parameters:
tree
- SObject tree to submitcallback
-CompositeApiClient.ResponseCallback
to handle response or exception- Throws:
SalesforceException
-
setAccessToken
protected void setAccessToken(org.eclipse.jetty.client.api.Request request) - Specified by:
setAccessToken
in classAbstractClientBase
-