June 1999
Intermediate to advanced
368 pages
8h 21m
English
In addition to the account entry (which stores persistent information for a user), we also need to store data about each user that is present only as long as the user is online. When a user logs in, the messenger creates and writes a SessionEntry object into the space, which serves two purposes. First, its existence in the space means that the user can be considered online. It also provides an object in which per-session information, such as the date and time the user signed on, can be stored. Here is the definition of the session entry:
public class SessionEntry implements Entry { public String username; public Long loginTime; public SessionEntry() { } public SessionEntry(String username) { this.username = username; } public ...Read now
Unlock full access