public class DiffusionClient extends AbstractDiffusionClient
This class is responsible for the connection to Diffusion and for un-marshaling messages from Diffusion.
An example of use would be the following..
DiffusionClient client = new DiffusionClient(); ConnectionDetails cnxDetails = new ConnectionDetails( new ServerDetails( new URL( "dpt://localhost:8080/" ) ) ); client.setConnectionDetails( cnxDetails ); client.setConnectionListener(this); client.connect();
theConnectionDetails
Constructor and Description |
---|
DiffusionClient() |
Modifier and Type | Method and Description |
---|---|
void |
connect()
Connect, using the connection information already provided, try and
connect to Diffusion.
|
String |
getDebugTag()
Fetch the value of the debug tag
|
com.pushtechnology.mobile.internal.DiffusionTransport |
getTransport()
getTransport
|
void |
logException(Throwable thr)
Log the exception, in a manner consistent with the platform.
|
void |
reconnect()
Reconnect to the server.
|
void |
setDebugTag(String debugTag)
Set the value of the debug tag
|
addTopicListener, close, connected, connectionAborted, createPagedTopicHandler, createServiceTopicHandler, createTopicNotifyTopicHandler, disconnected, errorConnecting, fetch, fetch, getClientID, getConnectionDetails, getConnectionListener, getLastInteraction, getProperties, getTopicStatusListener, insertTopicListener, isAutoAck, isConnected, isDebug, isReconnected, onConnectionDetailsAcquired, onConnectionSequenceExhausted, onMessage, onMessageNotAcknowledged, onPingMessage, onServerRejectedCredentials, ping, removeTopicListener, send, sendCredentials, sendMessage, sendTopicMessage, setAutoAck, setConnectionDetails, setConnectionListener, setDebug, setIsConnectedToDiffusion, setIsReconnectedToDiffusion, setTopicStatusListener, subscribe, topicDeleted, unsubscribe
public void reconnect() throws APIException
reconnect
in class AbstractDiffusionClient
APIException
- thrown if the client is not currently connected.public void connect()
connect
in class AbstractDiffusionClient
public com.pushtechnology.mobile.internal.DiffusionTransport getTransport()
AbstractDiffusionClient
getTransport
in class AbstractDiffusionClient
public void logException(Throwable thr)
AbstractDiffusionClient
Should only log if setDebug( true )
has been called.
logException
in class AbstractDiffusionClient
thr
- Throwable for loggingpublic String getDebugTag()
Used as the 2nd argument given to Log.e(...) when logging exceptions caught by the transport library
public void setDebugTag(String debugTag)
debugTag
- New value of the debug tagCopyright © 2016 Push Technology Ltd. All Rights Reserved.