public class SalesforceSession extends Object implements org.apache.camel.Service
Modifier and Type | Class and Description |
---|---|
static interface |
SalesforceSession.SalesforceSessionListener |
Constructor and Description |
---|
SalesforceSession(SalesforceHttpClient httpClient,
long timeout,
SalesforceLoginConfig config) |
Modifier and Type | Method and Description |
---|---|
boolean |
addListener(SalesforceSession.SalesforceSessionListener listener) |
String |
getAccessToken() |
String |
getInstanceUrl() |
org.eclipse.jetty.client.api.Request |
getLoginRequest(org.eclipse.jetty.client.HttpConversation conversation)
Creates login request, allows SalesforceSecurityHandler to create a login request for a failed authentication conversation
|
long |
getTimeout() |
String |
login(String oldToken) |
void |
logout() |
void |
parseLoginResponse(org.eclipse.jetty.client.api.ContentResponse loginResponse,
String responseContent)
Parses login response, allows SalesforceSecurityHandler to parse a login request for a failed authentication conversation.
|
boolean |
removeListener(SalesforceSession.SalesforceSessionListener listener) |
void |
start() |
void |
stop() |
public SalesforceSession(SalesforceHttpClient httpClient, long timeout, SalesforceLoginConfig config)
public String login(String oldToken) throws SalesforceException
SalesforceException
public org.eclipse.jetty.client.api.Request getLoginRequest(org.eclipse.jetty.client.HttpConversation conversation)
public void parseLoginResponse(org.eclipse.jetty.client.api.ContentResponse loginResponse, String responseContent) throws SalesforceException
loginResponse
- responseContent
- SalesforceException
public void logout() throws SalesforceException
SalesforceException
public String getAccessToken()
public String getInstanceUrl()
public boolean addListener(SalesforceSession.SalesforceSessionListener listener)
public boolean removeListener(SalesforceSession.SalesforceSessionListener listener)
public void start() throws Exception
start
in interface org.apache.camel.Service
Exception
public void stop() throws Exception
stop
in interface org.apache.camel.Service
Exception
public long getTimeout()
Apache Camel