优化代码,增加日志

This commit is contained in:
Binary Wang
2018-08-27 21:03:32 +08:00
parent 3bc2bbc208
commit 5f1290720e
21 changed files with 149 additions and 87 deletions

View File

@@ -1,5 +1,9 @@
package me.chanjar.weixin.common.session;
/**
*
* @author Daniel Qian
*/
public interface InternalSession {
/**

View File

@@ -1,5 +1,8 @@
package me.chanjar.weixin.common.session;
/**
* @author Daniel Qian
*/
public interface InternalSessionManager {
/**

View File

@@ -1,11 +1,18 @@
package me.chanjar.weixin.common.session;
import me.chanjar.weixin.common.util.res.StringManager;
import java.util.*;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import me.chanjar.weixin.common.util.res.StringManager;
/**
* @author Daniel Qian
*/
public class StandardSession implements WxSession, InternalSession {
/**

View File

@@ -2,6 +2,9 @@ package me.chanjar.weixin.common.session;
import java.util.Enumeration;
/**
* @author Daniel Qian
*/
public class StandardSessionFacade implements WxSession {
/**

View File

@@ -1,15 +1,18 @@
package me.chanjar.weixin.common.session;
import me.chanjar.weixin.common.util.res.StringManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import me.chanjar.weixin.common.util.res.StringManager;
/**
* 基于内存的session manager
* 基于内存的session manager.
*
* @author Daniel Qian
*/
public class StandardSessionManager implements WxSessionManager, InternalSessionManager {

View File

@@ -19,6 +19,8 @@ package me.chanjar.weixin.common.session;
/**
* An exception that indicates the maximum number of active sessions has been
* reached and the server is refusing to create any new sessions.
*
* @author Daniel Qian
*/
public class TooManyActiveSessionsException
extends IllegalStateException {

View File

@@ -2,6 +2,9 @@ package me.chanjar.weixin.common.session;
import java.util.Enumeration;
/**
* @author Daniel Qian
*/
public interface WxSession {
Object getAttribute(String name);

View File

@@ -1,5 +1,8 @@
package me.chanjar.weixin.common.session;
/**
* @author Daniel Qian
*/
public interface WxSessionManager {
/**