/** * Get an MqttConnection object to represent a connection to a server * * @param serverURI specifies the protocol, host name and port to be used to connect to an MQTT server * @param clientId specifies the name by which this connection should be identified to the server * @param contextId specifies the app conext info to make a difference between apps * @param persistence specifies the persistence layer to be used with this client * @return a string to be used by the Activity as a "handle" for this * MqttConnection */ public String getClient(String serverURI, String clientId, String contextId, MqttClientPersistence persistence) { String clientHandle = serverURI + ":" + clientId+":"+contextId; if (!connections.containsKey(clientHandle)) { MqttConnection client = new MqttConnection(this, serverURI, clientId, persistence, clientHandle); connections.put(clientHandle, client); } return clientHandle; }
/** * Get an MqttConnection object to represent a connection to a server * * @param serverURI specifies the protocol, host name and port to be used to connect to an MQTT server * @param clientId specifies the name by which this connection should be identified to the server * @param contextId specifies the app conext info to make a difference between apps * @param persistence specifies the persistence layer to be used with this client * @return a string to be used by the Activity as a "handle" for this * MqttConnection */ public String getClient(String serverURI, String clientId, String contextId, MqttClientPersistence persistence) { String clientHandle = serverURI + ":" + clientId+":"+contextId; if (!connections.containsKey(clientHandle)) { MqttConnection client = new MqttConnection(this, serverURI, clientId, persistence, clientHandle); connections.put(clientHandle, client); } return clientHandle; }
/** * Get an MqttConnection object to represent a connection to a server * * @param serverURI specifies the protocol, host name and port to be used to connect to an MQTT server * @param clientId specifies the name by which this connection should be identified to the server * @param contextId specifies the app conext info to make a difference between apps * @param persistence specifies the persistence layer to be used with this client * @return a string to be used by the Activity as a "handle" for this * MqttConnection */ public String getClient(String serverURI, String clientId, String contextId, MqttClientPersistence persistence) { String clientHandle = serverURI + ":" + clientId+":"+contextId; if (!connections.containsKey(clientHandle)) { MqttConnection client = new MqttConnection(this, serverURI, clientId, persistence, clientHandle); connections.put(clientHandle, client); } return clientHandle; }