public final class CurrentSystemTimeResponse extends Object
Response sent in reply to a request to get the current system time.
This response object is a simple wrapper around a long
. However,
it is needed because want to enforce JSON serialization as a string
(serializing 64-bit integers as JSON integers can be dangerous) and we want
the response to be kind of self describing.
Constructor and Description |
---|
CurrentSystemTimeResponse(long currentSystemTimeMilliseconds)
Creates a current-system-time response.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
long |
getCurrentSystemTimeMilliseconds()
Returns the current system time on the server at the time when the
response was created.
|
int |
hashCode() |
String |
toString() |
public CurrentSystemTimeResponse(long currentSystemTimeMilliseconds)
currentSystemTimeMilliseconds
- the current system time in milliseconds. When creating the
response (not deserializing it), this should be set to the
return value of System.currentTimeMillis()
.public long getCurrentSystemTimeMilliseconds()
System.currentTimeMillis()
.System.currentTimeMillis()
at the time
when the response was created on the server that was queried.Copyright © 2011–2017 aquenos GmbH. All rights reserved.