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 |
addReceivedRequests(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 with UNKNOWN reason.
|
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()
Get the disconnection reason of the session.
|
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.
|
long |
getLoggedInTime()
Get logged in time.
|
long |
getMaxIdleTime()
Get max idle time.
|
long |
getMaxWaitingTime()
Get max waiting time to authenticate.
|
String |
getOwnerName()
Get the owner username of the session.
|
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()
Get activated value.
|
boolean |
isDestroyed()
The session is destroyed or not.
|
boolean |
isIdle()
The session is idle or not.
|
boolean |
isLoggedIn()
Get is logged in value.
|
boolean |
isStreamingEnable()
The streaming is enabled or not.
|
void |
setActivated(boolean activated)
Set activated value.
|
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)
Set logged in time.
|
void |
setMaxIdleTime(long time)
Set max idle time.
|
void |
setMaxWaitingTime(long time)
Set max waiting time to authenticate.
|
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 keybyte[] getSessionKey()
void setSessionKey(byte[] key)
key - the session keyString 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()
void setToken(String token)
token - the reconnection tokenString getBeforeToken()
byte[] getPrivateKey()
void setPrivateKey(byte[] key)
key - the keybyte[] getPublicKey()
void setPublicKey(byte[] key)
key - the public keylong 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 addReceivedRequests(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 timeboolean isLoggedIn()
void setLoggedIn(boolean value)
value - logged in or notlong getLoggedInTime()
void setLoggedInTime(long time)
time - the logged timelong getMaxWaitingTime()
void setMaxWaitingTime(long time)
time - the max waiting for user login timeboolean isActivated()
void setActivated(boolean activated)
activated - session is active or notboolean 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 reasondefault void disconnect()
EzyChannel 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()
Copyright © 2024 Young Monkeys. All rights reserved.