protected ClientState(MqttClientPersistence persistence, CommsTokenStore tokenStore, CommsCallback callback, ClientComms clientComms, MqttPingSender pingSender) throws MqttException { log.setResourceName(clientComms.getClient().getClientId()); log.finer(CLASS_NAME, "<Init>", "" ); inUseMsgIds = new Hashtable(); pendingMessages = new Vector(this.maxInflight); pendingFlows = new Vector(); outboundQoS2 = new Hashtable(); outboundQoS1 = new Hashtable(); inboundQoS2 = new Hashtable(); pingCommand = new MqttPingReq(); inFlightPubRels = 0; actualInFlight = 0; this.persistence = persistence; this.callback = callback; this.tokenStore = tokenStore; this.clientComms = clientComms; this.pingSender = pingSender; restoreState(); }
/** * Creates a new ClientComms object, using the specified module to handle * the network calls. */ public ClientComms(IMqttAsyncClient client, MqttClientPersistence persistence, MqttPingSender pingSender) throws MqttException { this.conState = DISCONNECTED; this.client = client; this.persistence = persistence; this.pingSender = pingSender; this.pingSender.init(this); this.tokenStore = new CommsTokenStore(getClient().getClientId()); this.callback = new CommsCallback(this); this.clientState = new ClientState(persistence, tokenStore, this.callback, this, pingSender); callback.setClientState(clientState); log.setResourceName(getClient().getClientId()); }
public MqttClientPing(String serverURI, String clientId, MqttClientPersistence persistence, MqttPingSender pingSender) throws MqttException { super(serverURI, clientId, persistence); aClient = new MqttAsyncClient(serverURI, clientId, persistence, pingSender); }
public MqttAsyncClientEx(String serverURI, String clientId, MqttClientPersistence persistence, MqttPingSender pingSender) throws MqttException { super(serverURI, clientId, persistence, pingSender); }
public Jdk16MqttWebSocketAsyncClient(String serverURI, String clientId, MqttClientPersistence persistence, MqttPingSender pingSender, String loggerName) throws MqttException { super(serverURI, clientId, persistence, pingSender, loggerName); }