mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
优化代码,增加日志
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
package me.chanjar.weixin.common.session;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Daniel Qian
|
||||
*/
|
||||
public interface InternalSession {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package me.chanjar.weixin.common.session;
|
||||
|
||||
/**
|
||||
* @author Daniel Qian
|
||||
*/
|
||||
public interface InternalSessionManager {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,9 @@ package me.chanjar.weixin.common.session;
|
||||
|
||||
import java.util.Enumeration;
|
||||
|
||||
/**
|
||||
* @author Daniel Qian
|
||||
*/
|
||||
public class StandardSessionFacade implements WxSession {
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -2,6 +2,9 @@ package me.chanjar.weixin.common.session;
|
||||
|
||||
import java.util.Enumeration;
|
||||
|
||||
/**
|
||||
* @author Daniel Qian
|
||||
*/
|
||||
public interface WxSession {
|
||||
|
||||
Object getAttribute(String name);
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package me.chanjar.weixin.common.session;
|
||||
|
||||
/**
|
||||
* @author Daniel Qian
|
||||
*/
|
||||
public interface WxSessionManager {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user