程序包 cn.zhxu.toys.msg
类 RateLimitMsgSender
java.lang.Object
cn.zhxu.toys.msg.RateLimitMsgSender
- 所有已实现的接口:
MsgSender
带限速功能的短信发送器
- 作者:
- Troy.Zhou @ 2022/8/17 20:30
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected SendResultintintintlongbooleanbooleanprotected SendResult发送信息voidsetCachePrefix(String cachePrefix) voidsetCacheSeconds(int cacheSeconds) voidsetCacheService(CacheService cacheService) voidsetErrorIfReject(boolean errorIfReject) voidsetKeyResolver(KeyResolver keyResolver) voidsetMaxAllowPerUnit(int maxAllowPerUnit) voidsetMinIntervalSeconds(int minIntervalSeconds) voidsetMsgSender(MsgSender msgSender) voidsetRejectIfKeyBlank(boolean rejectIfKeyBlank) voidsetUnitSeconds(long unitSeconds) voidsetWhiteList(List<String> whiteList)
-
构造器详细资料
-
RateLimitMsgSender
public RateLimitMsgSender()
-
-
方法详细资料
-
send
从接口复制的说明:MsgSender发送信息 -
doSend
-
reject
-
getMsgSender
-
setMsgSender
-
getKeyResolver
-
setKeyResolver
-
getCacheService
-
setCacheService
-
getCachePrefix
-
setCachePrefix
-
getMaxAllowPerUnit
public int getMaxAllowPerUnit() -
setMaxAllowPerUnit
public void setMaxAllowPerUnit(int maxAllowPerUnit) -
getUnitSeconds
public long getUnitSeconds() -
setUnitSeconds
public void setUnitSeconds(long unitSeconds) -
getCacheSeconds
public int getCacheSeconds() -
setCacheSeconds
public void setCacheSeconds(int cacheSeconds) -
getMinIntervalSeconds
public int getMinIntervalSeconds() -
setMinIntervalSeconds
public void setMinIntervalSeconds(int minIntervalSeconds) -
getWhiteList
-
setWhiteList
-
isRejectIfKeyBlank
public boolean isRejectIfKeyBlank() -
setRejectIfKeyBlank
public void setRejectIfKeyBlank(boolean rejectIfKeyBlank) -
isErrorIfReject
public boolean isErrorIfReject() -
setErrorIfReject
public void setErrorIfReject(boolean errorIfReject)
-