Skip to content

Commit

Permalink
一些微小的修改
Browse files Browse the repository at this point in the history
  • Loading branch information
congyh committed May 4, 2017
1 parent f2b7a38 commit 50ffaf7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wechat-platform-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>wechat-platform-SDK</artifactId>
<groupId>com.github.congyh</groupId>
<version>0.2</version>
<version>0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ public final class BasicDuplicateMessageDetector implements WeChatDuplicateMessa
private final long validTime;
// 清理重复消息的周期, 比validTime小即可, 默认与微信重发时间间隔相同
private final long clearInterval;
// 判断后台清理线程是否已经启动
private volatile boolean started;

public BasicDuplicateMessageDetector(long validTime, long clearInterval) {
this.validTime = validTime;
this.clearInterval = clearInterval;
// 不会造成this指针泄漏
// TODO 是否会造成this指针泄漏? 如果能有类似PostConstruct功能就好了
beginScheduledDetect();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class WeChatXmlInMessage extends AbstractMessage {
// 语音格式, 如amr, peex等
@XStreamAlias("Format")
private String format;
// 语音识别结果
/** 语音识别结果 */
@XStreamAlias("Recognition")
private String recognition;
// 视频消息缩略图的媒体id, 可以调用多媒体文件下载接口拉取数据
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public final class WeChatMessageRouter {
private static final List<WeChatMessageRouteRule> rules = new LinkedList<>();
// 由于WeChatMessageRouter是单例的, 所以WeChatSessionManager不主动创建, 也是单例的
private static WeChatSessionManager sessionManager = new BasicSessionManager();
// 由于WeChatMessageRouter是单例的, 所以WeChatSessionManager不主动创建, 也是单例的
private static WeChatDuplicateMessageDetector duplicateMessageDetector
= new BasicDuplicateMessageDetector();

Expand Down

0 comments on commit 50ffaf7

Please sign in to comment.