MCPcopy Index your code
hub / github.com/socketio/socket.io-client-java / Manager

Class Manager

src/main/java/io/socket/client/Manager.java:22–572  ·  view source on GitHub ↗

Manager class represents a connection to a given Socket.IO server.

Source from the content-addressed store, hash-verified

20 * Manager class represents a connection to a given Socket.IO server.
21 */
22public class Manager extends Emitter {
23
24 private static final Logger logger = Logger.getLogger(Manager.class.getName());
25
26 /*package*/ enum ReadyState {
27 CLOSED, OPENING, OPEN
28 }
29
30 /**
31 * Called on a successful connection.
32 */
33 public static final String EVENT_OPEN = "open";
34
35 /**
36 * Called on a disconnection.
37 */
38 public static final String EVENT_CLOSE = "close";
39
40 public static final String EVENT_PACKET = "packet";
41 public static final String EVENT_ERROR = "error";
42
43 /**
44 * Called on a successful reconnection.
45 */
46 public static final String EVENT_RECONNECT = "reconnect";
47
48 /**
49 * Called on a reconnection attempt error.
50 */
51 public static final String EVENT_RECONNECT_ERROR = "reconnect_error";
52
53 public static final String EVENT_RECONNECT_FAILED = "reconnect_failed";
54
55 public static final String EVENT_RECONNECT_ATTEMPT = "reconnect_attempt";
56
57 /**
58 * Called when a new transport is created. (experimental)
59 */
60 public static final String EVENT_TRANSPORT = Engine.EVENT_TRANSPORT;
61
62 /*package*/ static WebSocket.Factory defaultWebSocketFactory;
63 /*package*/ static Call.Factory defaultCallFactory;
64
65 /*package*/ ReadyState readyState;
66
67 private boolean _reconnection;
68 private boolean skipReconnect;
69 private boolean reconnecting;
70 private boolean encoding;
71 private int _reconnectionAttempts;
72 private long _reconnectionDelay;
73 private long _reconnectionDelayMax;
74 private double _randomizationFactor;
75 private final Backoff backoff;
76 private long _timeout;
77 private final URI uri;
78 private final List<Packet> packetBuffer = new ArrayList<>();
79 private final Queue<On.Handle> subs = new LinkedList<>();;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected