public class SalesforceBayeuxClient
extends org.cometd.client.BayeuxClient
SalesforceBayeuxClient
is an extension of a BayeuxClient
that can deal with Salesforce session management.
Modifier and Type | Class and Description |
---|---|
class |
SalesforceBayeuxClient.StreamingMessageConnectListener |
class |
SalesforceBayeuxClient.StreamingMessageHandshakeListener
Listener for /meta/handshake messages notifying about the handshake result.
|
org.cometd.client.BayeuxClient.BayeuxClientChannel, org.cometd.client.BayeuxClient.State
org.cometd.common.AbstractClientSession.AbstractSessionChannel
Constructor and Description |
---|
SalesforceBayeuxClient(Config config,
String serviceUrl,
SalesforceLongPollingTransport transport)
Create a new instance of this Bayeux client.
|
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
createDefaultLongPollingOptions() |
void |
handshake() |
Boolean |
isForceResubscribe() |
void |
onFailure(Throwable x,
List<? extends org.cometd.bayeux.Message> messages)
Callback method invoked when the given messages have failed to be sent.
|
static Map<String,Object> |
replaceMissingMandatoryOptionsWithDefaults(Map<String,Object> result) |
void |
subscribe(String channel,
org.cometd.bayeux.client.ClientSessionChannel.MessageListener messageListener) |
void |
unsubscribe() |
void |
unsubscribe(String channel) |
abort, disconnect, disconnect, disconnect, enqueueSend, getAllowedTransports, getBackoff, getBackoffIncrement, getCookie, getCookieStore, getId, getKnownTransportNames, getMaxBackoff, getOption, getOptionNames, getOptions, getState, getTransport, getTransport, getURL, handshake, handshake, handshake, handshake, handshake, initialize, isConnected, isDisconnected, isHandshook, messagesFailure, newChannel, newChannelId, onMessages, onSending, onTransportFailure, onTransportFailure, processConnect, processDisconnect, processHandshake, processMessage, putCookie, scheduleConnect, scheduleHandshake, send, sendBatch, sendConnect, sendHandshake, sendMessages, setOption, terminate, waitFor
addExtension, batch, dump, dump, endBatch, extendRcv, extendSend, getAttribute, getAttributeNames, getChannel, getChannel, getChannels, getExtensions, isBatching, newMessage, newMessageId, notifyListener, notifyListeners, receive, registerCallback, registerSubscriber, remoteCall, removeAttribute, removeExtension, resetSubscriptions, setAttribute, startBatch, unregisterCallback, unregisterSubscriber
public SalesforceBayeuxClient(Config config, String serviceUrl, SalesforceLongPollingTransport transport) throws MalformedURLException
config
- Salesforce connectionserviceUrl
- - url to connect bayeux client totransport
- - transport for the communication with serverMalformedURLException
- when serviceUrl is not correctpublic Boolean isForceResubscribe()
public static Map<String,Object> replaceMissingMandatoryOptionsWithDefaults(Map<String,Object> result)
public void onFailure(Throwable x, List<? extends org.cometd.bayeux.Message> messages)
Callback method invoked when the given messages have failed to be sent.
The default implementation logs the failure at INFO level.
onFailure
in class org.cometd.client.BayeuxClient
x
- the exception that caused the failuremessages
- the messages being sentpublic void handshake()
handshake
in interface org.cometd.bayeux.client.ClientSession
handshake
in class org.cometd.client.BayeuxClient
public void unsubscribe()
public void unsubscribe(String channel)
public void subscribe(String channel, org.cometd.bayeux.client.ClientSessionChannel.MessageListener messageListener)
Copyright © 2010–2020. All rights reserved.