public class MqttProtocol extends AbstractProtocol
COMPARATOR| 构造器和说明 |
|---|
MqttProtocol() |
MqttProtocol(int messageMaxLength,
int nettyReaderIdleTimeSeconds,
int autoFlushIdleTime) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addInterceptHandler(InterceptHandler interceptHandler) |
void |
addPipeline(io.netty.channel.Channel channel)
add protocol pipeline support
|
boolean |
canSupport(io.netty.buffer.ByteBuf msg)
Support protocol
|
String |
getMetricsLibratoEmail() |
String |
getMetricsLibratoSource() |
String |
getMetricsLibratoToken() |
int |
getOrder()
default Priority order 0
|
String |
getProtocolName()
Get the protocol name
|
void |
internalPublish(io.netty.handler.codec.mqtt.MqttPublishMessage msg,
String clientId) |
boolean |
isEnableMetrics() |
<T extends AbstractNettyServer> |
onServerStart(T server) |
<T extends AbstractNettyServer> |
onServerStop(T server) |
void |
removeInterceptHandler(InterceptHandler interceptHandler) |
void |
setEnableMetrics(boolean enableMetrics) |
void |
setMetricsLibratoEmail(String metricsLibratoEmail) |
void |
setMetricsLibratoSource(String metricsLibratoSource) |
void |
setMetricsLibratoToken(String metricsLibratoToken) |
getAutoFlushIdleMs, setAutoFlushIdleMs, toStringcanSupportconfigpublic MqttProtocol()
public MqttProtocol(int messageMaxLength,
int nettyReaderIdleTimeSeconds,
int autoFlushIdleTime)
messageMaxLength - Maximum message length per pass (bytes)nettyReaderIdleTimeSeconds - Read idle interval (seconds)autoFlushIdleTime - Auto refresh buffer interval (s). If greater than 0, it will be on and auto refresh. If less than or equal to 0, it will refresh every timepublic String getProtocolName()
ProtocolHandlerpublic boolean canSupport(io.netty.buffer.ByteBuf msg)
ProtocolHandlermsg - client first messagepublic void addPipeline(io.netty.channel.Channel channel)
throws Exception
ProtocolHandleraddPipeline 在接口中 ProtocolHandleraddPipeline 在类中 AbstractProtocolchannel - TCP channelException - Exceptionpublic int getOrder()
ProtocolHandlergetOrder 在接口中 OrderedgetOrder 在接口中 ProtocolHandlergetOrder 在接口中 ServerListenergetOrder 在类中 AbstractProtocolpublic <T extends AbstractNettyServer> void onServerStart(T server) throws Exception
Exceptionpublic <T extends AbstractNettyServer> void onServerStop(T server) throws Exception
Exceptionpublic void internalPublish(io.netty.handler.codec.mqtt.MqttPublishMessage msg,
String clientId)
public void addInterceptHandler(InterceptHandler interceptHandler)
public void removeInterceptHandler(InterceptHandler interceptHandler)
public boolean isEnableMetrics()
public void setEnableMetrics(boolean enableMetrics)
public String getMetricsLibratoEmail()
public void setMetricsLibratoEmail(String metricsLibratoEmail)
public String getMetricsLibratoToken()
public void setMetricsLibratoToken(String metricsLibratoToken)
public String getMetricsLibratoSource()
public void setMetricsLibratoSource(String metricsLibratoSource)
Copyright © 2021. All rights reserved.