public class SessionData extends Object
Constructor and Description |
---|
SessionData(long sessionStart)
Creates a new session with given start and end of -1.
|
SessionData(long sessionStart,
long sessionEnd)
Creates a new session with given start and end.
|
Modifier and Type | Method and Description |
---|---|
void |
endSession(long endOfSession)
Ends the session with given end point.
|
boolean |
equals(Object obj) |
long |
getLength()
Get the length of the session in milliseconds.
|
long |
getSessionEnd()
Get the end of the session.
|
long |
getSessionStart()
Get the start of the session.
|
boolean |
isValid()
Check if the session start was before the end.
|
String |
toString() |
public SessionData(long sessionStart)
sessionStart
- Epoch millisecond the session was started.public SessionData(long sessionStart, long sessionEnd)
sessionStart
- Epoch millisecond the session was started.sessionEnd
- Epoch millisecond the session ended.public void endSession(long endOfSession)
endOfSession
- Epoch millisecond the session ended.public long getSessionStart()
public long getSessionEnd()
public long getLength()
public boolean isValid()
Copyright © 2017. All rights reserved.