Class: OmfCommon::Comm::XMPP::Topic
- Inherits:
-
Topic
- Object
- Topic
- OmfCommon::Comm::XMPP::Topic
show all
- Defined in:
- lib/omf_common/comm/xmpp/topic.rb
Instance Attribute Summary
Attributes inherited from Topic
#id, #routing_key
Instance Method Summary
collapse
Methods inherited from Topic
[], #after, #configure, create, #create, #create_message_and_publish, #error?, #inform, #on_inform, #on_message, #publish, #release, #request
Instance Method Details
#address ⇒ Object
16
17
18
19
|
# File 'lib/omf_common/comm/xmpp/topic.rb', line 16
def address
"xmpp://#{id.to_s}@#{@pubsub_domain}"
end
|
#on_subscribed(&block) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/omf_common/comm/xmpp/topic.rb', line 21
def on_subscribed(&block)
return unless block
@lock.synchronize do
@on_subscrided_handlers << block
end
end
|
#unsubscribe(key) ⇒ Object
29
30
31
32
|
# File 'lib/omf_common/comm/xmpp/topic.rb', line 29
def unsubscribe(key)
super
OmfCommon.comm._unsubscribe_one(self.id)
end
|