Tabnine Logo
SubscribeStore.getClientId
Code IndexAdd Tabnine to your IDE (free)

How to use
getClientId
method
in
cn.wizzer.iot.mqtt.server.common.subscribe.SubscribeStore

Best Java code snippets using cn.wizzer.iot.mqtt.server.common.subscribe.SubscribeStore.getClientId (Showing top 3 results out of 315)

origin: Wizzercn/MqttWk

@Override
public void put(String topicFilter, SubscribeStore subscribeStore) {
  if (StrUtil.contains(topicFilter, '#') || StrUtil.contains(topicFilter, '+')) {
    subscribeWildcardCache.put(topicFilter, subscribeStore.getClientId(), subscribeStore);
  } else {
    subscribeNotWildcardCache.put(topicFilter, subscribeStore.getClientId(), subscribeStore);
  }
}
origin: Wizzercn/MqttWk

private void sendPublishMessage(String clientId, String topic, MqttQoS mqttQoS, byte[] messageBytes, boolean retain, boolean dup) {
  List<SubscribeStore> subscribeStores = subscribeStoreService.search(topic);
  subscribeStores.forEach(subscribeStore -> {
    if (!clientId.equals(subscribeStore.getClientId()) && sessionStoreService.containsKey(subscribeStore.getClientId())) {
            new MqttFixedHeader(MqttMessageType.PUBLISH, dup, respQoS, retain, 0),
            new MqttPublishVariableHeader(topic, 0), ByteBuffer.wrap(messageBytes));
        LOGGER.debug("PUBLISH - clientId: {}, topic: {}, Qos: {}", subscribeStore.getClientId(), topic, respQoS.value());
        ChannelId channelId = channelIdMap.get(sessionStoreService.get(subscribeStore.getClientId()).getChannelId());
        if (channelId != null) {
          Channel channel = channelGroup.find(channelId);
            new MqttFixedHeader(MqttMessageType.PUBLISH, dup, respQoS, retain, 0),
            new MqttPublishVariableHeader(topic, messageId), ByteBuffer.wrap(messageBytes));
        LOGGER.debug("PUBLISH - clientId: {}, topic: {}, Qos: {}, messageId: {}", subscribeStore.getClientId(), topic, respQoS.value(), messageId);
        ChannelId channelId = channelIdMap.get(sessionStoreService.get(subscribeStore.getClientId()).getChannelId());
        if (channelId != null) {
          Channel channel = channelGroup.find(channelId);
            new MqttFixedHeader(MqttMessageType.PUBLISH, dup, respQoS, retain, 0),
            new MqttPublishVariableHeader(topic, messageId), ByteBuffer.wrap(messageBytes));
        LOGGER.debug("PUBLISH - clientId: {}, topic: {}, Qos: {}, messageId: {}", subscribeStore.getClientId(), topic, respQoS.value(), messageId);
        ChannelId channelId = channelIdMap.get(sessionStoreService.get(subscribeStore.getClientId()).getChannelId());
        if (channelId != null) {
          Channel channel = channelGroup.find(channelId);
origin: Wizzercn/MqttWk

private void sendPublishMessage(String topic, MqttQoS mqttQoS, byte[] messageBytes, boolean retain, boolean dup) {
  List<SubscribeStore> subscribeStores = subscribeStoreService.search(topic);
  subscribeStores.forEach(subscribeStore -> {
    if (sessionStoreService.containsKey(subscribeStore.getClientId())) {
            new MqttFixedHeader(MqttMessageType.PUBLISH, dup, respQoS, retain, 0),
            new MqttPublishVariableHeader(topic, 0), Unpooled.buffer().writeBytes(messageBytes));
        LOGGER.debug("PUBLISH - clientId: {}, topic: {}, Qos: {}", subscribeStore.getClientId(), topic, respQoS.value());
        ChannelId channelId = channelIdMap.get(sessionStoreService.get(subscribeStore.getClientId()).getChannelId());
        if(channelId!=null) {
          Channel channel = channelGroup.find(channelId);
            new MqttFixedHeader(MqttMessageType.PUBLISH, dup, respQoS, retain, 0),
            new MqttPublishVariableHeader(topic, messageId), Unpooled.buffer().writeBytes(messageBytes));
        LOGGER.debug("PUBLISH - clientId: {}, topic: {}, Qos: {}, messageId: {}", subscribeStore.getClientId(), topic, respQoS.value(), messageId);
        DupPublishMessageStore dupPublishMessageStore = new DupPublishMessageStore().setClientId(subscribeStore.getClientId())
            .setTopic(topic).setMqttQoS(respQoS.value()).setMessageBytes(messageBytes).setMessageId(messageId);
        dupPublishMessageStoreService.put(subscribeStore.getClientId(), dupPublishMessageStore);
        ChannelId channelId = channelIdMap.get(sessionStoreService.get(subscribeStore.getClientId()).getChannelId());
        if(channelId!=null) {
          Channel channel = channelGroup.find(channelId);
            new MqttFixedHeader(MqttMessageType.PUBLISH, dup, respQoS, retain, 0),
            new MqttPublishVariableHeader(topic, messageId), Unpooled.buffer().writeBytes(messageBytes));
        LOGGER.debug("PUBLISH - clientId: {}, topic: {}, Qos: {}, messageId: {}", subscribeStore.getClientId(), topic, respQoS.value(), messageId);
        DupPublishMessageStore dupPublishMessageStore = new DupPublishMessageStore().setClientId(subscribeStore.getClientId())
            .setTopic(topic).setMqttQoS(respQoS.value()).setMessageBytes(messageBytes).setMessageId(messageId);
        dupPublishMessageStoreService.put(subscribeStore.getClientId(), dupPublishMessageStore);
        ChannelId channelId = channelIdMap.get(sessionStoreService.get(subscribeStore.getClientId()).getChannelId());
        if(channelId!=null) {
cn.wizzer.iot.mqtt.server.common.subscribeSubscribeStoregetClientId

Popular methods of SubscribeStore

  • <init>
  • getMqttQoS

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now