source: java/main/src/main/java/com/framsticks/util/dispatching/AtOnceDispatcher.java

Last change on this file was 193, checked in by Maciej Komosinski, 10 years ago

Set svn:eol-style native for all textual files

  • Property svn:eol-style set to native
File size: 866 bytes
RevLine 
[84]1package com.framsticks.util.dispatching;
2
[98]3
[84]4/**
5 * @author Piotr Sniegowski
6 */
[101]7public class AtOnceDispatcher<C> extends AbstractJoinable implements Dispatcher<C> {
[84]8
[85]9        @SuppressWarnings("rawtypes")
10        protected static final AtOnceDispatcher instance = new AtOnceDispatcher();
[84]11
[85]12        @SuppressWarnings("unchecked")
13        public static <C> Dispatcher<C> getInstance() {
14                return (Dispatcher<C>) instance;
15        }
[84]16
[85]17        @Override
18        public final boolean isActive() {
19                return true;
20        }
21
22        @Override
[90]23        public final void dispatch(RunAt<? extends C> runnable) {
[97]24                runnable.runAt();
[85]25        }
[88]26
[99]27        @Override
28        public String getName() {
29                return "atonce";
30        }
31
32        @Override
33        protected void joinableStart() {
34
35        }
36
37        @Override
38        protected void joinableInterrupt() {
[101]39                finishJoinable();
[99]40        }
41
42        @Override
43        protected void joinableFinish() {
44
45        }
46
47        @Override
48        protected void joinableJoin() throws InterruptedException {
49
50        }
51
[84]52}
Note: See TracBrowser for help on using the repository browser.