File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
main/java/org/codefx/libfx/listener
test/java/org/codefx/libfx/listener Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ package org .codefx .libfx .listener ;
2
+
3
+ // TODO what should the contract be for created handles? Always attached?
4
+ // Answer: Up to the returning method to specify!
5
+
6
+ public interface ListenerHandle {
7
+
8
+ void attach ();
9
+
10
+ void detach ();
11
+
12
+ }
Original file line number Diff line number Diff line change
1
+ package org .codefx .libfx .listener ;
2
+
3
+ /**
4
+ * Indicates how to create the {@link ListenerHandle}. If the handle is created by a builder, the corresponding method
5
+ * should be called (in order to test it) instead of attaching/detaching the listener after its creation.
6
+ */
7
+ public enum CreateListenerHandle {
8
+
9
+ /**
10
+ * The listener must be initially attached.
11
+ */
12
+ ATTACHED ,
13
+
14
+ /**
15
+ * The listener must be initially detached.
16
+ */
17
+ DETACHED ;
18
+ }
You can’t perform that action at this time.
0 commit comments