|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.unamur.inference.web.UserSession<T>
T - public class UserSession<T extends UserRequest>
Represents a sequence of UserRequests. Each request follow the
previous one in time.
| Field Summary | |
|---|---|
protected Date |
endTime
The end time of the sequence. |
protected Date |
startTime
The start time of the sequence. |
| Constructor Summary | |
|---|---|
UserSession(String userId)
Creates a new session for the user identified by the given id. |
|
| Method Summary | |
|---|---|
void |
enqueue(T request)
Add a new request to the session. |
Date |
getEndTime()
Returns the end time of the sequence. |
Date |
getStartTime()
Returns the start time of the sequence. |
String |
getUserId()
Returns the id of the user who issued this request. |
Iterator<T> |
iterator()
|
void |
setUserId(String userId)
Set the id of the user who issued this request. |
int |
size()
Returns the number of requests in the session. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Date startTime
protected Date endTime
| Constructor Detail |
|---|
public UserSession(String userId)
userId - The id of the user issuing the requests of the session.| Method Detail |
|---|
public String getUserId()
public void setUserId(String userId)
userId - The new user's id.public Date getStartTime()
public Date getEndTime()
public int size()
public String toString()
toString in class Objectpublic Iterator<T> iterator()
iterator in interface Iterable<T extends UserRequest>public void enqueue(T request)
request - The request to add. Has to be later than the last request
added to the session (request.getTime() > this.getEndTime() ).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||