/** * Validates the will fields. */ private void validateWill(String dest, Object payload) { if ((dest == null) || (payload == null)) { throw new IllegalArgumentException(); } MqttTopic.validate(dest, false/*wildcards NOT allowed*/); }
MqttTopic.validate(topic, false/* wildcards NOT allowed */);
MqttTopic.validate(topicFilters[i], true/* allow wildcards */);
public IMqttDeliveryToken publish(String topic, MqttMessage message, Object userContext, IMqttActionListener callback) throws MqttException, MqttPersistenceException { final String methodName = "publish"; // @TRACE 111=< topic={0} message={1}userContext={1} callback={2} log.fine(CLASS_NAME, methodName, "111", new Object[] { topic, userContext, callback }); // Checks if a topic is valid when publishing a message. MqttTopic.validate(topic, false/* wildcards NOT allowed */); MqttDeliveryToken token = new MqttDeliveryToken(getClientId()); token.setActionCallback(callback); token.setUserContext(userContext); token.setMessage(message); token.internalTok.setTopics(new String[] { topic }); MqttPublish pubMsg = new MqttPublish(topic, message); comms.sendNoWait(pubMsg, token); // @TRACE 112=< log.fine(CLASS_NAME, methodName, "112"); return token; }
/** * Validates the will fields. */ private void validateWill(String dest, Object payload) { if ((dest == null) || (payload == null)) { throw new IllegalArgumentException(); } MqttTopic.validate(dest, false/*wildcards NOT allowed*/); }
/** * Validates the will fields. */ private void validateWill(String dest, Object payload) { if ((dest == null) || (payload == null)) { throw new IllegalArgumentException(); } MqttTopic.validate(dest, false/*wildcards NOT allowed*/); }
private static void validateMqttTopic(final String address, final boolean wildcardAllowed, final Function<String, DittoRuntimeException> errorProducer) { try { MqttTopic.validate(address, wildcardAllowed); } catch (final IllegalArgumentException e) { throw errorProducer.apply(e.getMessage()); } }
private static void validateMqttTopic(final String address, final boolean wildcardAllowed, final Function<String, DittoRuntimeException> errorProducer) { try { MqttTopic.validate(address, wildcardAllowed); } catch (final IllegalArgumentException e) { throw errorProducer.apply(e.getMessage()); } }
MqttTopic.validate(topicFilters[i], true/* allow wildcards */);
private boolean addTopic(View v, final String qos, final String topic){ try{ MqttTopic.validate(topic,true);
MqttTopic.validate(topic,false);
MqttTopic.validate(topicFilters[i], true/* allow wildcards */);
MqttTopic.validate(topicFilters[i], true/* allow wildcards */);
public IMqttDeliveryToken publish(String topic, MqttMessage message, Object userContext, IMqttActionListener callback) throws MqttException, MqttPersistenceException { final String methodName = "publish"; // @TRACE 111=< topic={0} message={1}userContext={1} callback={2} log.fine(CLASS_NAME, methodName, "111", new Object[] { topic, userContext, callback }); // Checks if a topic is valid when publishing a message. MqttTopic.validate(topic, false/* wildcards NOT allowed */); MqttDeliveryToken token = new MqttDeliveryToken(getClientId()); token.setActionCallback(callback); token.setUserContext(userContext); token.setMessage(message); token.internalTok.setTopics(new String[] { topic }); MqttPublish pubMsg = new MqttPublish(topic, message); comms.sendNoWait(pubMsg, token); // @TRACE 112=< log.fine(CLASS_NAME, methodName, "112"); return token; }
public IMqttDeliveryToken publish(String topic, MqttMessage message, Object userContext, IMqttActionListener callback) throws MqttException, MqttPersistenceException { final String methodName = "publish"; // @TRACE 111=< topic={0} message={1}userContext={1} callback={2} log.fine(CLASS_NAME, methodName, "111", new Object[] { topic, userContext, callback }); // Checks if a topic is valid when publishing a message. MqttTopic.validate(topic, false/* wildcards NOT allowed */); MqttDeliveryToken token = new MqttDeliveryToken(getClientId()); token.setActionCallback(callback); token.setUserContext(userContext); token.setMessage(message); token.internalTok.setTopics(new String[] { topic }); MqttPublish pubMsg = new MqttPublish(topic, message); comms.sendNoWait(pubMsg, token); // @TRACE 112=< log.fine(CLASS_NAME, methodName, "112"); return token; }
MqttTopic.validate(topicFilters[i], true/* allow wildcards */);
MqttTopic.validate(topicFilters[i], true/* allow wildcards */);