public static ServiceAdapter < Timer > forTimer ( ) { return new SimpleServiceAdapter < Timer > ( false , false ) { @ Override protected void start ( Timer instance ) { } @ Override protected void stop ( Timer instance ) { instance . cancel ( ) ; } } ; }
Returns factory which transforms Timer to ConcurrentService . On starting it doing nothing on stop it cancel timer .