Package org.apache.activemq.transport.mqtt.strategy

Examples of org.apache.activemq.transport.mqtt.strategy.MQTTSubscriptionStrategy


            synchronized (STRATAGY_FINDER) {
                if (subsciptionStrategy != null) {
                    return subsciptionStrategy;
                }

                MQTTSubscriptionStrategy strategy = null;
                if (subscriptionStrategyName != null && !subscriptionStrategyName.isEmpty()) {
                    try {
                        strategy = (MQTTSubscriptionStrategy) STRATAGY_FINDER.newInstance(subscriptionStrategyName);
                        LOG.debug("MQTT Using subscription strategy: {}", subscriptionStrategyName);
                        if (strategy instanceof BrokerServiceAware) {
                            ((BrokerServiceAware)strategy).setBrokerService(brokerService);
                        }
                        strategy.initialize(this);
                    } catch (Exception e) {
                        throw IOExceptionSupport.create(e);
                    }
                } else {
                    throw new IOException("Invalid subscription strategy name given: " + subscriptionStrategyName);
View Full Code Here

TOP

Related Classes of org.apache.activemq.transport.mqtt.strategy.MQTTSubscriptionStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.