Class: Bixby::RpcHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/bixby-common/api/rpc_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ RpcHandler

Returns a new instance of RpcHandler.



5
6
# File 'lib/bixby-common/api/rpc_handler.rb', line 5

def initialize(*args)
end

Instance Method Details

#connect(json_req, api) ⇒ Object

Channel connect event

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

the server-side.

Parameters:



24
25
26
# File 'lib/bixby-common/api/rpc_handler.rb', line 24

def connect(json_req, api)
  # no-op
end

#disconnect(api) ⇒ Object

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

the server-side.

Parameters:



33
34
35
# File 'lib/bixby-common/api/rpc_handler.rb', line 33

def disconnect(api)
  # no-op
end

#handle(request) ⇒ JsonResponse

Handle a request

Parameters:

Returns:

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/bixby-common/api/rpc_handler.rb', line 13

def handle(request)
  raise NotImplementedError
end