org.apache.camel.component.salesforce.internal.client
Class AbstractClientBase
java.lang.Object
org.apache.camel.component.salesforce.internal.client.AbstractClientBase
- All Implemented Interfaces:
- SalesforceSession.SalesforceSessionListener, org.apache.camel.Service
- Direct Known Subclasses:
- DefaultBulkApiClient, DefaultRestClient
public abstract class AbstractClientBase
- extends Object
- implements SalesforceSession.SalesforceSessionListener, org.apache.camel.Service
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
APPLICATION_JSON_UTF8
protected static final String APPLICATION_JSON_UTF8
- See Also:
- Constant Field Values
APPLICATION_XML_UTF8
protected static final String APPLICATION_XML_UTF8
- See Also:
- Constant Field Values
log
protected final org.slf4j.Logger log
httpClient
protected final org.eclipse.jetty.client.HttpClient httpClient
session
protected final SalesforceSession session
version
protected final String version
accessToken
protected String accessToken
instanceUrl
protected String instanceUrl
AbstractClientBase
public AbstractClientBase(String version,
SalesforceSession session,
org.eclipse.jetty.client.HttpClient httpClient)
throws SalesforceException
- Throws:
SalesforceException
start
public void start()
throws Exception
- Specified by:
start
in interface org.apache.camel.Service
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop
in interface org.apache.camel.Service
- Throws:
Exception
onLogin
public void onLogin(String accessToken,
String instanceUrl)
- Specified by:
onLogin
in interface SalesforceSession.SalesforceSessionListener
onLogout
public void onLogout()
- Specified by:
onLogout
in interface SalesforceSession.SalesforceSessionListener
getContentExchange
protected SalesforceExchange getContentExchange(String method,
String url)
doHttpRequest
protected void doHttpRequest(org.eclipse.jetty.client.ContentExchange request,
AbstractClientBase.ClientResponseCallback callback)
setAccessToken
public void setAccessToken(String accessToken)
setInstanceUrl
public void setInstanceUrl(String instanceUrl)
setAccessToken
protected abstract void setAccessToken(org.eclipse.jetty.client.HttpExchange httpExchange)
createRestException
protected abstract SalesforceException createRestException(org.eclipse.jetty.client.ContentExchange httpExchange)
Apache Camel