Skip to content

Commit

Permalink
WsProvider refactoring (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaninja authored Feb 11, 2022
1 parent 951e47d commit a03ef19
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 101 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {

allprojects {
group = 'com.strategyobject.substrateclient'
version = '0.0.2-SNAPSHOT'
version = '0.0.3-SNAPSHOT'

repositories {
mavenLocal()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ public interface ProviderInterface {
*/
boolean hasSubscriptions();


/**
* @return Current status
*/
ProviderStatus getStatus();

/**
* Whether the node is connected or not
*
Expand All @@ -30,7 +36,7 @@ public interface ProviderInterface {
/**
* Manually disconnect from the connection, clearing auto-connect logic
*/
void disconnect();
CompletableFuture<Void> disconnect();

/**
* Subscribe to provider events
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.strategyobject.substrateclient.transport;

public enum ProviderStatus {
CONNECTING,
CONNECTED,
DISCONNECTING,
DISCONNECTED
}
Loading

0 comments on commit a03ef19

Please sign in to comment.