Here is the code:
timer.schedule(new TimerTask() { public void run() { synchronized(this) { try {
I can say that the code is mainly used to schedule operations using an object of class Timer . The parameters passed to the schedule method according to eclipse are equal (TimerTask task,long delay, long period) . But, looking at this code, the entire block of code is passed as the first parameter instead of a reference to the TimerTask class. I have never seen such a method before. What exactly is going on here?
Some background: the schedule method of the Timer object is used to update the feed on Xively (formerly COSM (formerly pachube)).
Also I donโt know which tag describes what is happening here. If you add it or write a comment.
source share