public abstract class AbstractClientBase extends Object implements SalesforceSession.SalesforceSessionListener, org.apache.camel.Service
| 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 org.eclipse.jetty.client.HttpClient |
httpClient |
protected String |
instanceUrl |
protected org.slf4j.Logger |
log |
protected SalesforceSession |
session |
protected String |
version |
| Constructor and Description |
|---|
AbstractClientBase(String version,
SalesforceSession session,
org.eclipse.jetty.client.HttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract SalesforceException |
createRestException(org.eclipse.jetty.client.ContentExchange httpExchange) |
protected void |
doHttpRequest(org.eclipse.jetty.client.ContentExchange request,
AbstractClientBase.ClientResponseCallback callback) |
protected SalesforceExchange |
getContentExchange(String method,
String url) |
void |
onLogin(String accessToken,
String instanceUrl) |
void |
onLogout() |
protected abstract void |
setAccessToken(org.eclipse.jetty.client.HttpExchange httpExchange) |
void |
setAccessToken(String accessToken) |
void |
setInstanceUrl(String instanceUrl) |
void |
start() |
void |
stop() |
protected static final String APPLICATION_JSON_UTF8
protected static final String APPLICATION_XML_UTF8
protected final org.slf4j.Logger log
protected final org.eclipse.jetty.client.HttpClient httpClient
protected final SalesforceSession session
protected final String version
protected String accessToken
protected String instanceUrl
public AbstractClientBase(String version, SalesforceSession session, org.eclipse.jetty.client.HttpClient httpClient) throws SalesforceException
SalesforceExceptionpublic void start()
throws Exception
start in interface org.apache.camel.ServiceExceptionpublic void stop()
throws Exception
stop in interface org.apache.camel.ServiceExceptionpublic void onLogin(String accessToken, String instanceUrl)
onLogin in interface SalesforceSession.SalesforceSessionListenerpublic void onLogout()
onLogout in interface SalesforceSession.SalesforceSessionListenerprotected SalesforceExchange getContentExchange(String method, String url)
protected void doHttpRequest(org.eclipse.jetty.client.ContentExchange request,
AbstractClientBase.ClientResponseCallback callback)
public void setAccessToken(String accessToken)
public void setInstanceUrl(String instanceUrl)
protected abstract void setAccessToken(org.eclipse.jetty.client.HttpExchange httpExchange)
protected abstract SalesforceException createRestException(org.eclipse.jetty.client.ContentExchange httpExchange)
Apache Camel