Ignore:
Timestamp:
06/24/13 13:38:40 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • upgrade to Java 7
    • use try-multi-catch clauses
    • use try-with-resources were appropriate
  • configure FindBugs? (use mvn site and then navigate in browser to the report)
    • remove most bugs found
  • parametrize Dispatching environment (Dispatcher, RunAt?) to enforce more control on the place of closures actual call

CHANGELOG:
Rework FavouritesXMLFactory.

FindBugs?. Thread start.

FindBugs?. Minor change.

FindBugs?. Iterate over entrySet.

FindBugs?. Various.

FindBug?.

FindBug?. Encoding.

FindBug?. Final fields.

FindBug?.

Remove synchronization bug in ClientConnection?.

Experiments with findbugs.

Finish parametrization.

Make RunAt? an abstract class.

More changes in parametrization.

More changes in parametrizing dispatching.

Several changes to parametrize tasks.

Rename Runnable to RunAt?.

Add specific framsticks Runnable.

Add JSR305 (annotations).

Add findbugs reporting.

More improvements to ParamBuilder? wording.

Make FramsClass? accept also ParamBuilder?.

Change wording of ParamBuilder?.

Change wording of Request creation.

Use Java 7 exception catch syntax.

Add ScopeEnd? class.

Upgrade to Java 7.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/util/PeriodicTask.java

    r84 r85  
    33import com.framsticks.util.dispatching.Dispatcher;
    44import com.framsticks.util.dispatching.Task;
     5import com.framsticks.util.dispatching.RunAt;
    56
    67/**
    78 * @author Piotr Sniegowski
    89 */
    9 public abstract class PeriodicTask implements Runnable {
     10public abstract class PeriodicTask<C> extends RunAt<C> {
    1011
    11     protected final long period;
    12     protected Dispatcher dispatcher;
     12        protected final long period;
     13        protected Dispatcher<? super C> dispatcher;
    1314
    14     public PeriodicTask(Dispatcher dispatcher, long period) {
    15         this.period = period;
    16         this.dispatcher = dispatcher;
    17         dispatcher.invokeLater(this);
    18     }
     15        public PeriodicTask(Dispatcher<? super C> dispatcher, long period) {
     16                this.period = period;
     17                this.dispatcher = dispatcher;
     18                dispatcher.invokeLater(this);
     19        }
    1920
    2021
    21     public void again() {
    22         dispatcher.invokeLater(new Task(System.currentTimeMillis() + period) {
    23             @Override
    24             public void run() {
    25                 PeriodicTask.this.run();
    26             }
    27         });
    28     }
     22        public void again() {
     23                dispatcher.invokeLater(new Task<C>(System.currentTimeMillis() + period) {
     24                        @Override
     25                        public void run() {
     26                                PeriodicTask.this.run();
     27                        }
     28                });
     29        }
    2930
    3031}
Note: See TracChangeset for help on using the changeset viewer.