public class CurrentTimeService extends java.lang.Object implements AppContextService<CurrentTimeService>
AppContextService
that returns the current time.
This is to allow tests to override the service to supply a different time.Constructor and Description |
---|
CurrentTimeService() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
AppContext is being closed. |
java.util.Date |
getCurrentTime() |
java.lang.Class<? super CurrentTimeService> |
getType()
Returns the type of service the class should be registered under.
|
public void cleanup()
AppContextCleanup
AppContext
is being closed.
Only use this for cleanup that can't be handled by
normal garbage collection or for state which is never returned by reference.cleanup
in interface AppContextCleanup
public java.util.Date getCurrentTime()
public java.lang.Class<? super CurrentTimeService> getType()
AppContextService
getType
in interface AppContextService<CurrentTimeService>