spring - Java Bean :: How can you create a dynamically executed method (that can be re-adjusted) -


I am looking for a bean in which some N minutes have the ability to execute some code.

Sarcissis

worker class

  Class worker {@ etovir Myssev MySsevari; MyService.notifyUser (10); }  

service class

  class MyService {public zero notified user (int nMinutes) {// busy code}}  

You can edit the java.util.Timer and java.util.TimerTask Class

  last timer timer = new timer (); // You can work once to work: Timer. Scheduling (New Timer Task) {@ Override Public Wide Run ({{System.out.println ("Working is done ..");}}, 5); // You need to repeat the task after the duration of the time, just like this timer. Schedulatétefixertat (New TimerTask) {@ Override Public Wired Run} {System.out.println ("Repeat the ongoing work .."}}}}, 1 * 60 * 1000, 1 * 60 * 1000); // After one minute  

The timer service should also see the doctor


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -