Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ public enum WebsocketConnectionState { | |
RECONNECTING, | ||
DISCONNECTED, | ||
CONNECTING, | ||
CONNECTED | ||
CONNECTED, | ||
LOST | ||
} |
34 changes: 34 additions & 0 deletions
34
...socket/src/main/java/com/github/twitch4j/client/websocket/events/WebsocketStateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.github.twitch4j.client.websocket.events; | ||
|
||
import com.github.twitch4j.client.websocket.domain.WebsocketConnectionState; | ||
import lombok.Getter; | ||
|
||
/** | ||
* Websocket State Event | ||
* | ||
* Called when the websocket changes it's connection state. | ||
*/ | ||
@Getter | ||
public class WebsocketStateEvent { | ||
|
||
/** | ||
* Websocket State | ||
*/ | ||
private final WebsocketConnectionState state; | ||
|
||
/** | ||
* The parent of the websocket | ||
*/ | ||
private final AutoCloseable parent; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param state The state of the websocket | ||
* @param parent The parent of the websocket | ||
*/ | ||
public WebsocketStateEvent(WebsocketConnectionState state, AutoCloseable parent) { | ||
this.state = state; | ||
this.parent = parent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters