class Bixby::RpcHandler

Public Class Methods

new(*args) click to toggle source
# File lib/bixby-common/api/rpc_handler.rb, line 5
def initialize(*args)
end

Public Instance Methods

connect(json_req, api) click to toggle source

Channel connect event

NOTE: only used by WebSocket channels and generally only implemented by

the server-side.

@param [Bixby::JsonRequest] json_req @param [Bixby::APIChannel] api

# File lib/bixby-common/api/rpc_handler.rb, line 24
def connect(json_req, api)
  # no-op
end
disconnect(api) click to toggle source

Channel disconnection event NOTE: only used by WebSocket channels and generally only implemented by

the server-side.

@param [Bixby::APIChannel] api

# File lib/bixby-common/api/rpc_handler.rb, line 33
def disconnect(api)
  # no-op
end
handle(request) click to toggle source

Handle a request

@param [JsonRequest] request

@return [JsonResponse] response

# File lib/bixby-common/api/rpc_handler.rb, line 13
def handle(request)
  raise NotImplementedError
end