public class RemoteDataEmitter extends Object
| Constructor and Description |
|---|
RemoteDataEmitter(String inURL,
String inUsername,
String inPassword,
EmitterAdapter inAdapter)
Creates an instance that connects to the specified remote source of data
and publishes the received data and notifications to the supplied
adapter instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection to the remote source of data.
|
Exception |
getLastFailure()
The last failure encountered when receiving data.
|
boolean |
isConnected()
Returns true if no failures have been encountered when
receiving data from the remote source.
|
public RemoteDataEmitter(String inURL, String inUsername, String inPassword, EmitterAdapter inAdapter)
inURL - the URL of remote source of data. Cannot be null.inUsername - the user name to authenticate to the remote source. Cannot be null.inPassword - the password to authenticate to the remote source. Cannot be null.inAdapter - the adapter instance. Cannot be null.RuntimeException - if there were errors connecting.public void close()
If one needs to reconnect to the remote source, a new instance of this class should be created.
This method does not fail if the attempt to close the connection fails. In case of failures, the failures are logged and the method returns silently.
public Exception getLastFailure()
public boolean isConnected()
Copyright © 2019. All rights reserved.