mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
代码优化,由IDEA自动进行的Code Cleanup
This commit is contained in:
@@ -13,7 +13,7 @@ public interface InternalSession {
|
||||
*
|
||||
* @param isValid The new value for the <code>isValid</code> flag
|
||||
*/
|
||||
public void setValid(boolean isValid);
|
||||
void setValid(boolean isValid);
|
||||
|
||||
/**
|
||||
* Return the <code>isValid</code> flag for this session.
|
||||
|
||||
@@ -28,14 +28,14 @@ public interface InternalSessionManager {
|
||||
* @exception IllegalStateException if a new session cannot be
|
||||
* instantiated for any reason
|
||||
*/
|
||||
public InternalSession createSession(String sessionId);
|
||||
InternalSession createSession(String sessionId);
|
||||
|
||||
/**
|
||||
* Remove this Session from the active Sessions for this Manager.
|
||||
*
|
||||
* @param session Session to be removed
|
||||
*/
|
||||
public void remove(InternalSession session);
|
||||
void remove(InternalSession session);
|
||||
|
||||
/**
|
||||
* Remove this Session from the active Sessions for this Manager.
|
||||
@@ -43,7 +43,7 @@ public interface InternalSessionManager {
|
||||
* @param session Session to be removed
|
||||
* @param update Should the expiration statistics be updated
|
||||
*/
|
||||
public void remove(InternalSession session, boolean update);
|
||||
void remove(InternalSession session, boolean update);
|
||||
|
||||
/**
|
||||
* Add this Session to the set of active Sessions for this Manager.
|
||||
@@ -71,7 +71,7 @@ public interface InternalSessionManager {
|
||||
/**
|
||||
* Implements the Manager interface, direct call to processExpires
|
||||
*/
|
||||
public void backgroundProcess();
|
||||
void backgroundProcess();
|
||||
|
||||
/**
|
||||
* Set the default maximum inactive interval (in seconds)
|
||||
|
||||
@@ -323,9 +323,8 @@ public class StandardSession implements WxSession, InternalSession {
|
||||
if (!attributes.equals(session.attributes)) return false;
|
||||
if (!facade.equals(session.facade)) return false;
|
||||
if (!id.equals(session.id)) return false;
|
||||
if (!manager.equals(session.manager)) return false;
|
||||
return manager.equals(session.manager);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,14 +4,14 @@ import java.util.Enumeration;
|
||||
|
||||
public interface WxSession {
|
||||
|
||||
public Object getAttribute(String name);
|
||||
Object getAttribute(String name);
|
||||
|
||||
public Enumeration<String> getAttributeNames();
|
||||
Enumeration<String> getAttributeNames();
|
||||
|
||||
public void setAttribute(String name, Object value);
|
||||
void setAttribute(String name, Object value);
|
||||
|
||||
public void removeAttribute(String name);
|
||||
void removeAttribute(String name);
|
||||
|
||||
public void invalidate();
|
||||
void invalidate();
|
||||
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@ public interface WxSessionManager {
|
||||
/**
|
||||
* 获取某个sessionId对应的session,如果sessionId没有对应的session,则新建一个并返回。
|
||||
*/
|
||||
public WxSession getSession(String sessionId);
|
||||
WxSession getSession(String sessionId);
|
||||
|
||||
/**
|
||||
* 获取某个sessionId对应的session,如果sessionId没有对应的session,若create为true则新建一个,否则返回null。
|
||||
*/
|
||||
public WxSession getSession(String sessionId, boolean create);
|
||||
WxSession getSession(String sessionId, boolean create);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user