Class: Bixby::RpcHandler
- Inherits:
-
Object
- Object
- Bixby::RpcHandler
- Defined in:
- lib/bixby-common/api/rpc_handler.rb
Instance Method Summary collapse
-
#connect(json_req, api) ⇒ Object
Channel connect event.
-
#disconnect(api) ⇒ Object
Channel disconnection event NOTE: only used by WebSocket channels and generally only implemented by the server-side.
-
#handle(request) ⇒ JsonResponse
Handle a request.
-
#initialize(*args) ⇒ RpcHandler
constructor
A new instance of RpcHandler.
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.
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.
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
13 14 15 |
# File 'lib/bixby-common/api/rpc_handler.rb', line 13 def handle(request) raise NotImplementedError end |