|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.service.time.ntptime.TimeServiceImpl
public class TimeServiceImpl
This class is a singleton class and should be used to retun the adjusted time value. NTP protocol implementation receives time from this class. The only method implemented in this class is getTime(), which should be used to get the adjusted current time.
| Method Summary | |
|---|---|
long |
getDelta()
Gets the last change in the offset value |
static TimeServiceImpl |
getInstance()
Gets the only instance of TimeServiceImpl. |
long |
getOffset()
Gets offset value between the local computer's time and the computed time from NTP protocol. |
ServiceException |
getServiceException()
Returns ServiceException |
long |
getTimestamp()
Gets adjusted time |
void |
setOffset(long offDelta)
Adjusts the offset value by delta. |
void |
setServiceException(ServiceException serviceException)
Sets exception |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TimeServiceImpl getInstance()
public long getDelta()
public void setOffset(long offDelta)
offDelta - - adjustment to be made to offsetpublic long getOffset()
getOffset in interface TimeServicepublic void setServiceException(ServiceException serviceException)
serviceException - public ServiceException getServiceException()
public long getTimestamp()
throws ServiceException
getTimestamp in interface TimeServiceServiceException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||