public interface EzySession extends EzyDeliver, com.tvd12.ezyfox.constant.EzyHasName, com.tvd12.ezyfox.util.EzyProperties, com.tvd12.ezyfox.util.EzyDestroyable, Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
addReadBytes(long bytes)
Add read bytes
|
void |
addReadRequests(int requests)
add read requests
|
boolean |
addReceviedRequests(int requests)
add received requests
|
void |
addWrittenBytes(long bytes)
Add written bytes
|
void |
addWrittenResponses(int responses)
add written responses
|
void |
close()
close this session
|
default void |
disconnect()
disconnect
|
void |
disconnect(com.tvd12.ezyfox.constant.EzyConstant reason)
disconnect this session
|
String |
getBeforeToken()
Get before reconnect token
|
EzyChannel |
getChannel()
Get the channel mapped to this session
|
SocketAddress |
getClientAddress()
Get client full ip address
|
String |
getClientId()
Get client id
|
byte[] |
getClientKey()
Get client key to encrypt data send to client
|
String |
getClientType()
Get client type
|
String |
getClientVersion()
Get client version
|
<T> T |
getConnection()
Get connection
|
com.tvd12.ezyfox.constant.EzyConstant |
getConnectionType()
Get session connection type
|
long |
getCreationTime()
Get creation time in long
|
DatagramChannel |
getDatagramChannel()
Get upd channel
|
EzyDatagramChannelPool |
getDatagramChannelPool()
Get datagram channel pool
|
com.tvd12.ezyfox.constant.EzyConstant |
getDisconnectReason() |
EzyRequestQueue |
getExtensionRequestQueue()
Get extension request queue
|
long |
getId()
Get session id
|
long |
getLastActivityTime()
Get last activity time in long
|
long |
getLastReadTime()
Get last read time in long
|
long |
getLastWriteTime()
Get last write time in long
|
Lock |
getLock(String name) |
long |
getLoggedInTime() |
long |
getMaxIdleTime()
Get max idle time
|
long |
getMaxWaitingTime() |
String |
getOwnerName() |
EzyPacketQueue |
getPacketQueue()
Get packet queue
|
byte[] |
getPrivateKey()
Get private key
|
byte[] |
getPublicKey()
Get public key
|
long |
getReadBytes()
Get read bytes
|
int |
getReadRequests()
Get read requests
|
SocketAddress |
getServerAddress()
Get server full ip address
|
byte[] |
getSessionKey()
Get session key to encrypt data send to client
|
EzyRequestQueue |
getSystemRequestQueue()
Get system request queue
|
String |
getToken()
Get session reconnect token
|
SocketAddress |
getUdpClientAddress()
Get udp client address
|
long |
getWrittenBytes()
Get written bytes
|
int |
getWrittenResponses()
Get written responses
|
boolean |
isActivated() |
boolean |
isDestroyed() |
boolean |
isIdle() |
boolean |
isLoggedIn() |
boolean |
isStreamingEnable() |
void |
setActivated(boolean activated) |
void |
setChannel(EzyChannel channel)
Map this session to the channel
|
void |
setClientId(String id)
Set client id
|
void |
setClientKey(byte[] key)
Set client key
|
void |
setClientType(String type)
Set client type
|
void |
setClientVersion(String version)
Set client version
|
void |
setCreationTime(long time)
Set creation time
|
void |
setLastActivityTime(long time)
Set last activity time
|
void |
setLastReadTime(long time)
Set last read time
|
void |
setLastWriteTime(long time)
Set last write time
|
void |
setLoggedIn(boolean value)
Set logged in or not
|
void |
setLoggedInTime(long time) |
void |
setMaxIdleTime(long time) |
void |
setMaxWaitingTime(long time) |
void |
setPrivateKey(byte[] key)
The private key that decrypt data
|
void |
setPublicKey(byte[] key)
Set public key that encrypt data
|
void |
setSessionKey(byte[] key)
Set session key
|
void |
setToken(String token)
Set reconnect token
|
send, sendNowremoveProperty, setProperties, setPropertylong getId()
String getClientId()
void setClientId(String id)
id - the client idbyte[] getClientKey()
void setClientKey(byte[] key)
key - the client keyvoid setSessionKey(byte[] key)
key - the session keybyte[] getSessionKey()
String getClientType()
void setClientType(String type)
type - the client typeString getClientVersion()
void setClientVersion(String version)
version - the client versioncom.tvd12.ezyfox.constant.EzyConstant getConnectionType()
String getToken()
String getBeforeToken()
void setToken(String token)
token - the reconnect tokenvoid setPrivateKey(byte[] key)
key - the keybyte[] getPrivateKey()
void setPublicKey(byte[] key)
key - the public keybyte[] getPublicKey()
long getCreationTime()
void setCreationTime(long time)
time - the creation timelong getLastActivityTime()
void setLastActivityTime(long time)
time - the last activity timelong getLastReadTime()
void setLastReadTime(long time)
time - the last read timelong getLastWriteTime()
void setLastWriteTime(long time)
time - the last read timelong getReadBytes()
void addReadBytes(long bytes)
bytes - the read byteslong getWrittenBytes()
void addWrittenBytes(long bytes)
bytes - the written bytesint getReadRequests()
void addReadRequests(int requests)
requests - number of read requestsboolean addReceviedRequests(int requests)
requests - number of received requestsint getWrittenResponses()
void addWrittenResponses(int responses)
responses - number of responseslong getMaxIdleTime()
void setMaxIdleTime(long time)
time - the max idle timevoid setLoggedIn(boolean value)
value - logged in or notboolean isLoggedIn()
void setLoggedInTime(long time)
time - the logged timelong getLoggedInTime()
void setMaxWaitingTime(long time)
time - the max waiting for user login timelong getMaxWaitingTime()
void setActivated(boolean activated)
activated - session is active or notboolean isActivated()
boolean isIdle()
boolean isDestroyed()
boolean isStreamingEnable()
String getOwnerName()
com.tvd12.ezyfox.constant.EzyConstant getDisconnectReason()
SocketAddress getClientAddress()
SocketAddress getServerAddress()
void close()
void disconnect(com.tvd12.ezyfox.constant.EzyConstant reason)
reason - the reasonEzyChannel getChannel()
void setChannel(EzyChannel channel)
channel - the channel<T> T getConnection()
T - the connection typeEzyPacketQueue getPacketQueue()
EzyRequestQueue getSystemRequestQueue()
EzyRequestQueue getExtensionRequestQueue()
SocketAddress getUdpClientAddress()
DatagramChannel getDatagramChannel()
EzyDatagramChannelPool getDatagramChannelPool()
default void disconnect()
Copyright © 2021 Young Monkeys. All rights reserved.