/** * Process the results of a connection * * @param data */ private void connectAction(Bundle data) { IMqttToken token = connectToken; removeMqttToken(data); simpleAction(token, data); }
/** * Process notification of a subscribe operation * * @param data */ private void subscribeAction(Bundle data) { IMqttToken token = removeMqttToken(data); simpleAction(token, data); }
/** * Process notification of an unsubscribe operation * * @param data */ private void unSubscribeAction(Bundle data) { IMqttToken token = removeMqttToken(data); simpleAction(token, data); }
/** * Process notification of a published message having been delivered * * @param data */ private void messageDeliveredAction(Bundle data) { IMqttToken token = removeMqttToken(data); if (token != null) { if (callback != null) { Status status = (Status) data .getSerializable(MqttServiceConstants.CALLBACK_STATUS); if (status == Status.OK && token instanceof IMqttDeliveryToken) { callback.deliveryComplete((IMqttDeliveryToken) token); } } } }
/** * Process a notification that we have disconnected * * @param data */ private void disconnected(Bundle data) { clientHandle = null; // avoid reuse! IMqttToken token = removeMqttToken(data); if (token != null) { ((MqttTokenAndroid) token).notifyComplete(); } if (callback != null) { callback.connectionLost(null); } }
/** * Process the results of a connection * * @param data */ private void connectAction(Bundle data) { IMqttToken token = connectToken; removeMqttToken(data); simpleAction(token, data); }
/** * Process the results of a connection * * @param data */ private void connectAction(Bundle data) { IMqttToken token = connectToken; removeMqttToken(data); simpleAction(token, data); }
/** * Process notification of a subscribe operation * * @param data */ private void subscribeAction(Bundle data) { IMqttToken token = removeMqttToken(data); simpleAction(token, data); }
/** * Process notification of an unsubscribe operation * * @param data */ private void unSubscribeAction(Bundle data) { IMqttToken token = removeMqttToken(data); simpleAction(token, data); }
/** * Process notification of an unsubscribe operation * * @param data */ private void unSubscribeAction(Bundle data) { IMqttToken token = removeMqttToken(data); simpleAction(token, data); }
/** * Process notification of a subscribe operation * * @param data */ private void subscribeAction(Bundle data) { IMqttToken token = removeMqttToken(data); simpleAction(token, data); }
/** * Process notification of a published message having been delivered * * @param data */ private void messageDeliveredAction(Bundle data) { IMqttToken token = removeMqttToken(data); if (token != null) { if (callback != null) { Status status = (Status) data .getSerializable(MqttServiceConstants.CALLBACK_STATUS); if (status == Status.OK && token instanceof IMqttDeliveryToken) { callback.deliveryComplete((IMqttDeliveryToken) token); } } } }
/** * Process notification of a published message having been delivered * * @param data */ private void messageDeliveredAction(Bundle data) { IMqttToken token = removeMqttToken(data); if (token != null) { if (callback != null) { Status status = (Status) data .getSerializable(MqttServiceConstants.CALLBACK_STATUS); if (status == Status.OK && token instanceof IMqttDeliveryToken) { callback.deliveryComplete((IMqttDeliveryToken) token); } } } }
/** * Process a notification that we have disconnected * * @param data */ private void disconnected(Bundle data) { clientHandle = null; // avoid reuse! IMqttToken token = removeMqttToken(data); if (token != null) { ((MqttTokenAndroid) token).notifyComplete(); } if (callback != null) { callback.connectionLost(null); } }
/** * Process a notification that we have disconnected * * @param data */ private void disconnected(Bundle data) { clientHandle = null; // avoid reuse! IMqttToken token = removeMqttToken(data); if (token != null) { ((MqttTokenAndroid) token).notifyComplete(); } if (callback != null) { callback.connectionLost(null); } }