public class

SalesforceBayeuxClient

extends BayeuxClient
java.lang.Object
   ↳ org.cometd.common.AbstractClientSession
     ↳ org.cometd.client.BayeuxClient
       ↳ org.mule.modules.salesforce.SalesforceBayeuxClient

Class Overview

SalesforceBayeuxClient is an extension of a BayeuxClient that can deal with Salesforce session management.

Summary

Constants
int HANDSHAKE_TIMEOUT
String LANGUAGE_COOKIE
String LOCALEINFO_COOKIE
String LOGIN_COOKIE
int LONG_POLLING_TIMEOUT
String SESSIONID_COOKIE
[Expand]
Inherited Constants
From class org.cometd.client.BayeuxClient
Fields
protected static final Logger LOGGER
protected static final Map<String, Object> LONG_POLLING_OPTIONS
protected SalesforceModule salesforceModule
protected Map<String, ClientSessionChannel.MessageListener> subscriptions
[Expand]
Inherited Fields
From class org.cometd.client.BayeuxClient
From class org.cometd.common.AbstractClientSession
Public Constructors
SalesforceBayeuxClient(SalesforceModule salesforceModule)
Create a new instance of this Bayeux client.
Public Methods
void handshake()
void onFailure(Throwable x, Message[] messages)

Callback method invoked when the given messages have failed to be sent.

void subscribe(String channel, ClientSessionChannel.MessageListener messageListener)
void unsubscribe(String channel)
[Expand]
Inherited Methods
From class org.cometd.client.BayeuxClient
From class org.cometd.common.AbstractClientSession
From class java.lang.Object
From interface org.cometd.bayeux.Bayeux
From interface org.cometd.bayeux.Session
From interface org.cometd.bayeux.client.ClientSession

Constants

protected static final int HANDSHAKE_TIMEOUT

Constant Value: 30000 (0x00007530)

protected static final String LANGUAGE_COOKIE

Constant Value: "language"

protected static final String LOCALEINFO_COOKIE

Constant Value: "com.salesforce.LocaleInfo"

protected static final String LOGIN_COOKIE

Constant Value: "login"

protected static final int LONG_POLLING_TIMEOUT

Constant Value: 120000 (0x0001d4c0)

protected static final String SESSIONID_COOKIE

Constant Value: "sid"

Fields

protected static final Logger LOGGER

protected static final Map<String, Object> LONG_POLLING_OPTIONS

protected SalesforceModule salesforceModule

protected Map<String, ClientSessionChannel.MessageListener> subscriptions

Public Constructors

public SalesforceBayeuxClient (SalesforceModule salesforceModule)

Create a new instance of this Bayeux client.

Parameters
salesforceModule Salesforce connection
Throws
MalformedURLException
See Also
  • #BayeuxClient(String, java.util.concurrent.ScheduledExecutorService, ClientTransport, ClientTransport...)

Public Methods

public void handshake ()

public void onFailure (Throwable x, Message[] messages)

Callback method invoked when the given messages have failed to be sent.

The default implementation logs the failure at INFO level.

Parameters
x The exception that caused the failure
messages The messages being sent

public void subscribe (String channel, ClientSessionChannel.MessageListener messageListener)

Parameters
channel
messageListener

public void unsubscribe (String channel)

Parameters
channel