1 package dolda.dolcon.protocol;
7 Set<Listener> listeners = new HashSet<Listener>();
10 public interface Listener {
11 public void done(Response resp) throws Exception;
12 public void error(Exception cause);
15 public Command(List<String> tokens) {
19 public Command(String... tokens) {
20 this(Arrays.asList(tokens));
23 public void addListener(Listener l) {
27 public void done(Response resp) throws Exception {
29 for(Listener l : listeners)
33 public void error(Exception cause) {
34 for(Listener l : listeners)