Java 类io.netty.handler.codec.mqtt.MqttConnAckVariableHeader 实例源码

项目:lannister    文件:MqttMessageFactory.java   
public static MqttConnAckMessage connack(MqttConnectReturnCode returnCode, boolean sessionPresent) {
    MqttFixedHeader fixedHeader = new MqttFixedHeader(MqttMessageType.CONNACK, false, MqttQoS.AT_MOST_ONCE, false,
            2);
    MqttConnAckVariableHeader variableHeader = new MqttConnAckVariableHeader(returnCode, sessionPresent);

    return new MqttConnAckMessage(fixedHeader, variableHeader);
}
项目:iothub    文件:MqttTransportHandler.java   
private MqttConnAckMessage createMqttConnAckMsg(MqttConnectReturnCode returnCode) {
  MqttFixedHeader mqttFixedHeader = new MqttFixedHeader(CONNACK, false, AT_MOST_ONCE, false, 0);
  MqttConnAckVariableHeader mqttConnAckVariableHeader = new MqttConnAckVariableHeader(returnCode, true);
  return new MqttConnAckMessage(mqttFixedHeader, mqttConnAckVariableHeader);
}
项目:iotplatform    文件:MqttTransportHandler.java   
private MqttConnAckMessage createMqttConnAckMsg(MqttConnectReturnCode returnCode) {
  MqttFixedHeader mqttFixedHeader = new MqttFixedHeader(CONNACK, false, AT_MOST_ONCE, false, 0);
  MqttConnAckVariableHeader mqttConnAckVariableHeader = new MqttConnAckVariableHeader(returnCode, true);
  return new MqttConnAckMessage(mqttFixedHeader, mqttConnAckVariableHeader);
}
项目:blynk-server    文件:MqttHardwareLoginHandler.java   
private static MqttConnAckMessage createConnAckMessage(MqttConnectReturnCode code) {
    MqttFixedHeader mqttFixedHeader =
            new MqttFixedHeader(MqttMessageType.CONNACK, false, MqttQoS.AT_MOST_ONCE, false, 2);
    MqttConnAckVariableHeader mqttConnAckVariableHeader = new MqttConnAckVariableHeader(code, true);
    return new MqttConnAckMessage(mqttFixedHeader, mqttConnAckVariableHeader);
}
项目:activemq-artemis    文件:MQTTProtocolHandler.java   
void sendConnack(MqttConnectReturnCode returnCode) {
   MqttFixedHeader fixedHeader = new MqttFixedHeader(MqttMessageType.CONNACK, false, MqttQoS.AT_MOST_ONCE, false, 0);
   MqttConnAckVariableHeader varHeader = new MqttConnAckVariableHeader(returnCode, true);
   MqttConnAckMessage message = new MqttConnAckMessage(fixedHeader, varHeader);
   sendToClient(message);
}