Class: IbmAppconfigurationRubySdk::WebSocketClient

Inherits:
Object
  • Object
show all
Defined in:
lib/ibm_appconfiguration_ruby_sdk/websocket/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(region:, guid:, apikey:, collection_id:, environment_id:, start_background_retry: false) ⇒ WebSocketClient

Returns a new instance of WebSocketClient.



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ibm_appconfiguration_ruby_sdk/websocket/client.rb', line 21

def initialize(region:, guid:, apikey:, collection_id:, environment_id:, start_background_retry: false)
  @manager =
    IbmAppconfigurationRubySdk::ConnectionManager.new(
      region: region,
      guid: guid,
      apikey: apikey,
      collection_id: collection_id,
      environment_id: environment_id,
      start_background_retry: start_background_retry
    )
end

Instance Method Details

#connectObject



33
34
35
# File 'lib/ibm_appconfiguration_ruby_sdk/websocket/client.rb', line 33

def connect
  @manager.connect
end

#connected?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/ibm_appconfiguration_ruby_sdk/websocket/client.rb', line 41

def connected?
  @manager.connected?
end

#disconnectObject



37
38
39
# File 'lib/ibm_appconfiguration_ruby_sdk/websocket/client.rb', line 37

def disconnect
  @manager.disconnect
end