2017-07-16 13:10:15 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-01-06 17:16:02 -05:00
|
|
|
module ActionCable
|
2016-01-15 19:07:18 -05:00
|
|
|
module SubscriptionAdapter
|
2016-01-06 17:16:02 -05:00
|
|
|
class Base
|
|
|
|
attr_reader :logger, :server
|
|
|
|
|
|
|
|
def initialize(server)
|
|
|
|
@server = server
|
|
|
|
@logger = @server.logger
|
|
|
|
end
|
|
|
|
|
2016-01-14 00:25:41 -05:00
|
|
|
def broadcast(channel, payload)
|
2016-01-06 17:16:02 -05:00
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2016-01-14 00:25:41 -05:00
|
|
|
def subscribe(channel, message_callback, success_callback = nil)
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
|
|
|
def unsubscribe(channel, message_callback)
|
2016-01-06 17:16:02 -05:00
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2016-01-24 03:30:06 -05:00
|
|
|
|
|
|
|
def shutdown
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2019-02-13 12:27:23 -05:00
|
|
|
|
|
|
|
def identifier
|
|
|
|
@server.config.cable[:id] ||= "ActionCable-PID-#{$$}"
|
|
|
|
end
|
2016-01-06 17:16:02 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|