-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
7 changed files
with
39 additions
and
89 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:centrifuge_dart/centrifuge.dart'; | ||
import 'package:centrifuge_dart/src/client/centrifuge_interface.dart'; | ||
|
||
/// An interface for observing the behavior of Centrifuge instances. | ||
abstract class CentrifugeObserver { | ||
/// Called whenever a [ICentrifuge] is instantiated. | ||
void onCreate(ICentrifuge client) {} | ||
|
||
/// Called whenever a [ICentrifuge] client changes its state | ||
/// to [CentrifugeState$Connecting]. | ||
void onConnected(ICentrifuge client, CentrifugeState$Connected state) {} | ||
|
||
/// Called whenever a [ICentrifuge] client changes its state | ||
/// to [CentrifugeState$Disconnected]. | ||
void onDisconnected(ICentrifuge client, CentrifugeState$Disconnected state) {} | ||
|
||
/// Called whenever an error is thrown in any Centrifuge client. | ||
void onError(CentrifugeException error, StackTrace stackTrace) {} | ||
|
||
/// Called whenever a [ICentrifuge] is closed. | ||
void onClose(ICentrifuge client) {} | ||
} |
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