MCPcopy
hub / github.com/socketio/socket.io-client-java / On

Class On

src/main/java/io/socket/client/On.java:5–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import io.socket.emitter.Emitter;
4
5public class On {
6
7 private On() {}
8
9 public static Handle on(final Emitter obj, final String ev, final Emitter.Listener fn) {
10 obj.on(ev, fn);
11 return new Handle() {
12 @Override
13 public void destroy() {
14 obj.off(ev, fn);
15 }
16 };
17 }
18
19 public interface Handle {
20
21 void destroy();
22 }
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected