public abstract class AbstractClientBase extends org.apache.camel.support.service.ServiceSupport implements SalesforceSession.SalesforceSessionListener, HttpClientHolder
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AbstractClientBase.ClientResponseCallback |
| Modifier and Type | Field and Description |
|---|---|
protected String |
accessToken |
protected static String |
APPLICATION_JSON_UTF8 |
protected static String |
APPLICATION_XML_UTF8 |
protected SalesforceHttpClient |
httpClient |
protected String |
instanceUrl |
protected org.slf4j.Logger |
log |
protected SalesforceLoginConfig |
loginConfig |
protected SalesforceSession |
session |
protected String |
version |
| Constructor and Description |
|---|
AbstractClientBase(String version,
SalesforceSession session,
SalesforceHttpClient httpClient,
SalesforceLoginConfig loginConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract SalesforceException |
createRestException(org.eclipse.jetty.client.api.Response response,
InputStream responseContent) |
protected void |
doHttpRequest(org.eclipse.jetty.client.api.Request request,
AbstractClientBase.ClientResponseCallback callback) |
protected void |
doStart() |
void |
doStop() |
org.eclipse.jetty.client.HttpClient |
getHttpClient() |
protected org.eclipse.jetty.client.api.Request |
getRequest(org.eclipse.jetty.http.HttpMethod method,
String url,
Map<String,List<String>> headers) |
protected org.eclipse.jetty.client.api.Request |
getRequest(String method,
String url,
Map<String,List<String>> headers) |
void |
onLogin(String accessToken,
String instanceUrl) |
void |
onLogout() |
protected abstract void |
setAccessToken(org.eclipse.jetty.client.api.Request request) |
void |
setAccessToken(String accessToken) |
void |
setInstanceUrl(String instanceUrl) |
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, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected static final String APPLICATION_JSON_UTF8
protected static final String APPLICATION_XML_UTF8
protected final org.slf4j.Logger log
protected final SalesforceHttpClient httpClient
protected final SalesforceSession session
protected final SalesforceLoginConfig loginConfig
protected final String version
protected String accessToken
protected String instanceUrl
public AbstractClientBase(String version, SalesforceSession session, SalesforceHttpClient httpClient, SalesforceLoginConfig loginConfig)
protected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionpublic void doStop()
throws Exception
doStop in class org.apache.camel.support.service.BaseServiceExceptionpublic void onLogin(String accessToken, String instanceUrl)
onLogin in interface SalesforceSession.SalesforceSessionListenerpublic void onLogout()
onLogout in interface SalesforceSession.SalesforceSessionListenerprotected org.eclipse.jetty.client.api.Request getRequest(org.eclipse.jetty.http.HttpMethod method,
String url,
Map<String,List<String>> headers)
protected org.eclipse.jetty.client.api.Request getRequest(String method, String url, Map<String,List<String>> headers)
protected void doHttpRequest(org.eclipse.jetty.client.api.Request request,
AbstractClientBase.ClientResponseCallback callback)
public void setAccessToken(String accessToken)
public void setInstanceUrl(String instanceUrl)
public org.eclipse.jetty.client.HttpClient getHttpClient()
getHttpClient in interface HttpClientHolderprotected abstract void setAccessToken(org.eclipse.jetty.client.api.Request request)
protected abstract SalesforceException createRestException(org.eclipse.jetty.client.api.Response response, InputStream responseContent)
Apache Camel