Class DefaultRawClient
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.DefaultRawClient
- All Implemented Interfaces:
AutoCloseable
,HttpClientHolder
,RawClient
,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.RawClient
RawClient.ResponseCallback
-
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
ConstructorDescriptionDefaultRawClient
(SalesforceHttpClient httpClient, String version, SalesforceSession session, SalesforceLoginConfig loginConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected SalesforceException
createRestException
(org.eclipse.jetty.client.api.Response response, InputStream responseContent) void
makeRequest
(String method, String path, PayloadFormat format, InputStream body, Map<String, List<String>> headers, RawClient.ResponseCallback callback) Make a raw HTTP request to salesforceprotected void
setAccessToken
(org.eclipse.jetty.client.api.Request request) Methods inherited from class org.apache.camel.component.salesforce.internal.client.AbstractClientBase
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
-
DefaultRawClient
public DefaultRawClient(SalesforceHttpClient httpClient, String version, SalesforceSession session, SalesforceLoginConfig loginConfig) throws SalesforceException - Throws:
SalesforceException
-
-
Method Details
-
setAccessToken
protected void setAccessToken(org.eclipse.jetty.client.api.Request request) - Specified by:
setAccessToken
in classAbstractClientBase
-
createRestException
protected SalesforceException createRestException(org.eclipse.jetty.client.api.Response response, InputStream responseContent) - Overrides:
createRestException
in classAbstractClientBase
-
makeRequest
public void makeRequest(String method, String path, PayloadFormat format, InputStream body, Map<String, List<String>> headers, RawClient.ResponseCallback callback) Make a raw HTTP request to salesforce- Specified by:
makeRequest
in interfaceRawClient
- Parameters:
method
- HTTP method. "GET", "POST", etc.path
- The path of the URL. Must begin with a "/"format
- Encoding formatbody
- Optional HTTP bodyheaders
- HTTP headerscallback
- Callback instance that will be invoked when the HTTP call returns
-