Add SessionDisconnectJob to publish DisconnectEvent when Session timeouts #207
@@ -49,10 +49,16 @@ public class Session {
|
|||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the timestamp of the last inbound activity for this session.
|
||||||
|
*
|
||||||
|
* @return an {@link Instant} representing the time of the last inbound activity
|
||||||
|
*/
|
||||||
public Instant getLastInboundActivity() {
|
public Instant getLastInboundActivity() {
|
||||||
return lastActivity;
|
return lastActivity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Updates the timestamp of the last inbound activity for this session. */
|
||||||
public void updateLastInboundActivity() {
|
public void updateLastInboundActivity() {
|
||||||
this.lastActivity = Instant.now();
|
this.lastActivity = Instant.now();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user