Package com.batch.android.core
Class SecureDateProvider
- java.lang.Object
-
- com.batch.android.core.SecureDateProvider
-
- All Implemented Interfaces:
DateProvider
public class SecureDateProvider extends java.lang.Object implements DateProvider
Class used to get the real time based of the server sync date
-
-
Constructor Summary
Constructors Constructor Description SecureDateProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchDategetCurrentDate()java.util.DategetDate()Method used to obtain the real date based on the server date if the server date was syncvoidinitServerDate(java.util.Date pServerDate)Method used to init the server datebooleanisSyncDate()Method used to know if the date is sync with the server
-
-
-
Method Detail
-
getDate
public java.util.Date getDate()
Method used to obtain the real date based on the server date if the server date was sync- Returns:
- the actual secure time
-
isSyncDate
public boolean isSyncDate()
Method used to know if the date is sync with the server- Returns:
- true if the serverDate is sync false otherwise
-
initServerDate
public void initServerDate(java.util.Date pServerDate)
Method used to init the server date- Parameters:
pServerDate- the sync server date
-
getCurrentDate
public BatchDate getCurrentDate()
- Specified by:
getCurrentDatein interfaceDateProvider
-
-