Fixed javadoc (issue #164)
This commit is contained in:
@@ -474,6 +474,8 @@ public class ProtocolProcessor {
|
||||
* for Qos1 and Qos2.
|
||||
* It also doesn't notifyTopicPublished because using internally the owner should already know where
|
||||
* it's publishing.
|
||||
*
|
||||
* @param msg the message to publish.
|
||||
* */
|
||||
public void internalPublish(PublishMessage msg) {
|
||||
final AbstractMessage.QOSType qos = msg.getQos();
|
||||
@@ -539,6 +541,8 @@ public class ProtocolProcessor {
|
||||
/**
|
||||
* Second phase of a publish QoS2 protocol, sent by publisher to the broker. Search the stored message and publish
|
||||
* to all interested subscribers.
|
||||
* @param channel the channel of the incoming message.
|
||||
* @param msg the decoded pubrel message.
|
||||
* */
|
||||
public void processPubRel(Channel channel, PubRelMessage msg) {
|
||||
this.qos2PublishHandler.processPubRel(channel, msg);
|
||||
@@ -684,7 +688,9 @@ public class ProtocolProcessor {
|
||||
|
||||
/**
|
||||
* Remove the clientID from topic subscription, if not previously subscribed,
|
||||
* doesn't reply any error
|
||||
* doesn't reply any error.
|
||||
* @param channel the channel of the incoming message.
|
||||
* @param msg the decoded unsubscribe message.
|
||||
*/
|
||||
public void processUnsubscribe(Channel channel, UnsubscribeMessage msg) {
|
||||
List<String> topics = msg.topicFilters();
|
||||
|
||||
@@ -74,6 +74,8 @@ public class ProtocolProcessorBootstrapper {
|
||||
* and fallback on the default one (permit all).
|
||||
* @param authorizator an implementation of the authorizator to be used, if null load that specified in config
|
||||
* and fallback on the default one (permit all).
|
||||
* @param server the serber to init.
|
||||
* @return the processor created for the broker.
|
||||
* */
|
||||
public ProtocolProcessor init(IConfig props, List<? extends InterceptHandler> embeddedObservers,
|
||||
IAuthenticator authenticator, IAuthorizator authorizator, Server server) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.text.ParseException;
|
||||
/**
|
||||
* Parses the acl configuration file.
|
||||
* If a line starts with # it's comment.
|
||||
* Blank lines are skipped. The format is "topic [read|write|readwrite] <topic name>"
|
||||
* Blank lines are skipped. The format is "topic [read|write|readwrite] {topic name}"
|
||||
*
|
||||
* @author andrea
|
||||
* */
|
||||
@@ -33,6 +33,9 @@ public class ACLFileParser {
|
||||
|
||||
/**
|
||||
* Parse the configuration from file.
|
||||
* @param file to parse
|
||||
* @return the collector of authorizations form reader passed into.
|
||||
* @throws ParseException if the format is not compliant.
|
||||
*/
|
||||
public static AuthorizationsCollector parse(File file) throws ParseException {
|
||||
if (file == null) {
|
||||
@@ -54,8 +57,9 @@ public class ACLFileParser {
|
||||
|
||||
/**
|
||||
* Parse the ACL configuration file
|
||||
*
|
||||
* @throws java.text.ParseException if the format is not compliant.
|
||||
* @param reader to parse
|
||||
* @return the collector of authorizations form reader passed into.
|
||||
* @throws ParseException if the format is not compliant.
|
||||
*/
|
||||
public static AuthorizationsCollector parse(Reader reader) throws ParseException {
|
||||
if (reader == null) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import io.moquette.server.config.FileResourceLoader;
|
||||
|
||||
/**
|
||||
* Load user credentials from a text file.
|
||||
* Each line of the file is formatted as "<username>:<sha256(password)>". The username mustn't contains : char.
|
||||
* Each line of the file is formatted as "[username]:[sha256(password)]". The username mustn't contains : char.
|
||||
*
|
||||
* To encode your password from command line on Linux systems, you could use:
|
||||
* <pre>
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Load user credentials from a text resource.
|
||||
* Each line of the file is formatted as "<username>:<sha256(password)>". The username mustn't contains : char.
|
||||
* Each line of the file is formatted as "[username]:[sha256(password)]". The username mustn't contains : char.
|
||||
*
|
||||
* To encode your password from command line on Linux systems, you could use:
|
||||
* <pre>
|
||||
|
||||
@@ -44,6 +44,8 @@ public class SubscriptionsStore {
|
||||
|
||||
/**
|
||||
* Check if the topic filter of the subscription is well formed
|
||||
* @param topicFilter the filter to validate
|
||||
* @return true if it's correct.
|
||||
* */
|
||||
public static boolean validate(String topicFilter) {
|
||||
try {
|
||||
@@ -98,6 +100,7 @@ public class SubscriptionsStore {
|
||||
/**
|
||||
* Initialize the subscription tree with the list of subscriptions.
|
||||
* Maintained for compatibility reasons.
|
||||
* @param sessionsStore to be used as backing store from the subscription store.
|
||||
*/
|
||||
public void init(ISessionsStore sessionsStore) {
|
||||
LOG.debug("init invoked");
|
||||
@@ -178,6 +181,7 @@ public class SubscriptionsStore {
|
||||
/**
|
||||
* Visit the topics tree to remove matching subscriptions with clientID.
|
||||
* It's a mutating structure operation so create a new subscription tree (partial or total).
|
||||
* @param clientID the client ID to remove.
|
||||
*/
|
||||
public void removeForClient(String clientID) {
|
||||
TreeNode oldRoot;
|
||||
@@ -194,6 +198,9 @@ public class SubscriptionsStore {
|
||||
* Given a topic string return the clients subscriptions that matches it.
|
||||
* Topic string can't contain character # and + because they are reserved to
|
||||
* listeners subscriptions, and not topic publishing.
|
||||
*
|
||||
* @param topic to use fo searching matching subscriptions.
|
||||
* @return the list of matching subscriptions, or empty if not matching.
|
||||
*/
|
||||
public List<Subscription> matches(String topic) {
|
||||
List<Token> tokens;
|
||||
@@ -252,6 +259,9 @@ public class SubscriptionsStore {
|
||||
|
||||
/**
|
||||
* Verify if the 2 topics matching respecting the rules of MQTT Appendix A
|
||||
* @param msgTopic the topic to match from the message
|
||||
* @param subscriptionTopic the topic filter of the subscription
|
||||
* @return true if the two topics match.
|
||||
*/
|
||||
//TODO reimplement with iterators or with queues
|
||||
public static boolean matchTopics(String msgTopic, String subscriptionTopic) {
|
||||
|
||||
Reference in New Issue
Block a user