|
You are here |
www.arunkumar.dev | ||
| | | | |
ryanharter.com
|
|
| | | | | I recently gave a presentation about how Dagger works under the hood, and I was once again struck by the elegance of the javax.inject.Provider interface. The interface is so simple it almost seems useless, but it's also incredibly flexible, and forms the basis of much of the code generated by Dagger. Like many dependency injection frameworks for JVM languages, Dagger uses and builds on the standard set of annotations for injectable classes defined in JSR-330 and provided in the javax. | |
| | | | |
dagger.dev
|
|
| | | | | Dagger is a fully static, compile-time dependency injection framework for both Java and Android. | |
| | | | |
arturdryomov.dev
|
|
| | | | | Replacing Dagger with Kotlin. Wait, what? | |
| | | | |
www.craigpardey.com
|
|
| | | Spring 3.2 has some very nice features for scheduling tasks. The pure Java way of doing this looks something like private ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); class ScheduledTask implements Runnable { @Override public void run() { System.out.println("Running scheduled task"); } } // Schedule a task every 5 seconds executor.scheduleAtFixedRate(new ScheduledTask(), 1, 5, TimeUnit.SECONDS); // If you don't do this then the JVM won't exit cleanly executor.shutdown(); But now, with the snazzy new Spring scheduling annotations, it can be as simple as this | ||