1 package dolda.dolcon.protocol;
7 Set<Listener> listeners = new HashSet<Listener>();
10 public abstract class Listener {
15 public abstract void done(Response resp) throws Exception;
16 public abstract void error(Exception cause);
19 public Command(List<String> tokens) {
23 public Command(String... tokens) {
24 this(Arrays.asList(tokens));
27 private synchronized void addlst(Listener l) {
31 public synchronized void done(Response resp) throws Exception {
33 for(Listener l : listeners)
37 public synchronized void error(Exception cause) {
38 for(Listener l : listeners)