public class EzySimpleUser extends com.tvd12.ezyfox.entity.EzyEntity implements EzyUser, com.tvd12.ezyfox.util.EzyNameAware, EzyZoneIdAware, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
destroyed |
protected long |
id |
protected Map<String,Lock> |
locks |
protected long |
maxIdleTime |
protected int |
maxSessions |
protected String |
name |
protected String |
password |
protected Map<Long,EzySession> |
sessionMap |
protected long |
startIdleTime |
protected int |
zoneId |
| Constructor and Description |
|---|
EzySimpleUser() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(EzySession session)
Add new session
|
List<EzySession> |
changeSession(EzySession session)
change current session
|
void |
destroy() |
void |
disconnect(com.tvd12.ezyfox.constant.EzyConstant reason)
disconnect
|
boolean |
equals(Object obj) |
Lock |
getLock(String name) |
EzySession |
getSession()
Get the first session
|
int |
getSessionCount()
Get the session count
|
List<EzySession> |
getSessions()
Get current session
|
int |
hashCode() |
boolean |
isIdle() |
void |
removeSession(EzySession session)
remove a session
|
void |
send(EzyPacket packet) |
void |
sendNow(EzyPacket packet) |
String |
toString() |
containsKey, getProperties, getProperty, getProperty, removeProperty, setProperties, setPropertyclone, finalize, getClass, notify, notifyAll, wait, wait, waitdisconnect, getId, getMaxIdleTime, getMaxSessions, getStartIdleTime, getZoneId, isDestroyed, setStartIdleTimeremoveProperty, setProperties, setPropertycontainsKey, getProperties, getProperty, getProperty, getPropertysetZoneIdprotected long id
protected String name
protected String password
protected int zoneId
protected int maxSessions
protected long maxIdleTime
protected long startIdleTime
protected volatile boolean destroyed
protected Map<Long,EzySession> sessionMap
public void addSession(EzySession session)
EzyUseraddSession in interface EzyUsersession - the session to addpublic void removeSession(EzySession session)
EzyUserremoveSession in interface EzyUsersession - the session to removepublic List<EzySession> changeSession(EzySession session)
EzyUserchangeSession in interface EzyUsersession - the session to changepublic EzySession getSession()
EzyUsergetSession in interface EzyUserpublic List<EzySession> getSessions()
EzyUsergetSessions in interface EzyUserpublic int getSessionCount()
EzyUsergetSessionCount in interface EzyUserpublic void send(EzyPacket packet)
send in interface EzyDeliverpublic void sendNow(EzyPacket packet)
sendNow in interface EzyDeliverpublic void disconnect(com.tvd12.ezyfox.constant.EzyConstant reason)
EzyUserdisconnect in interface EzyUserreason - the reasonpublic void destroy()
destroy in interface com.tvd12.ezyfox.util.EzyDestroyableCopyright © 2021 Young Monkeys. All rights reserved.