class RIMS::ServerResponsePublisher
Attributes
mbox_id[R]
Public Class Methods
new(channel, mbox_id)
click to toggle source
do not call this method directly, call the following method instead.
- ServerResponseChannel#make_pub_sub_pair
# File lib/rims/channel.rb, line 85 def initialize(channel, mbox_id) @channel = channel @mbox_id = mbox_id end
Public Instance Methods
detach()
click to toggle source
# File lib/rims/channel.rb, line 107 def detach @channel = nil nil end
pub_sub_pair_key()
click to toggle source
# File lib/rims/channel.rb, line 92 def pub_sub_pair_key object_id end
publish(response_message)
click to toggle source
# File lib/rims/channel.rb, line 96 def publish(response_message) unless (@channel) then raise ServerResponseChannelPublishError.new('detached publisher.', publisher: self, pub_sub_pair_key: pub_sub_pair_key, message: response_message) end @channel.publish(@mbox_id, pub_sub_pair_key, response_message) nil end