Class: ActionCable::SubscriptionAdapter::Base

Inherits:
Object
  • Object
show all
Defined in:
actioncable/lib/action_cable/subscription_adapter/base.rb

Direct Known Subclasses

EventedRedis, Inline, PostgreSQL, Redis

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server) ⇒ Base

Returns a new instance of Base.


6
7
8
9
# File 'actioncable/lib/action_cable/subscription_adapter/base.rb', line 6

def initialize(server)
  @server = server
  @logger = @server.logger
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger


4
5
6
# File 'actioncable/lib/action_cable/subscription_adapter/base.rb', line 4

def logger
  @logger
end

#serverObject (readonly)

Returns the value of attribute server


4
5
6
# File 'actioncable/lib/action_cable/subscription_adapter/base.rb', line 4

def server
  @server
end

Instance Method Details

#broadcast(channel, payload) ⇒ Object

Raises:

  • (NotImplementedError)

11
12
13
# File 'actioncable/lib/action_cable/subscription_adapter/base.rb', line 11

def broadcast(channel, payload)
  raise NotImplementedError
end

#shutdownObject

Raises:

  • (NotImplementedError)

23
24
25
# File 'actioncable/lib/action_cable/subscription_adapter/base.rb', line 23

def shutdown
  raise NotImplementedError
end

#subscribe(channel, message_callback, success_callback = nil) ⇒ Object

Raises:

  • (NotImplementedError)

15
16
17
# File 'actioncable/lib/action_cable/subscription_adapter/base.rb', line 15

def subscribe(channel, message_callback, success_callback = nil)
  raise NotImplementedError
end

#unsubscribe(channel, message_callback) ⇒ Object

Raises:

  • (NotImplementedError)

19
20
21
# File 'actioncable/lib/action_cable/subscription_adapter/base.rb', line 19

def unsubscribe(channel, message_callback)
  raise NotImplementedError
end