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.ClientResponseCallbackNested 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, 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
ConstructorsConstructorDescriptionDefaultRawClient(SalesforceHttpClient httpClient, String version, SalesforceSession session, SalesforceLoginConfig loginConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected SalesforceExceptioncreateRestException(org.eclipse.jetty.client.api.Response response, InputStream responseContent) voidmakeRequest(String method, String path, PayloadFormat format, InputStream body, Map<String, List<String>> headers, RawClient.ResponseCallback callback) Make a raw HTTP request to salesforceprotected voidsetAccessToken(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, 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
-
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:
setAccessTokenin classAbstractClientBase
-
createRestException
protected SalesforceException createRestException(org.eclipse.jetty.client.api.Response response, InputStream responseContent) - Overrides:
createRestExceptionin 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:
makeRequestin 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
-