class Pione::Front::NotificationListenerFront

‘NotificationListenerFront` is a front interface for `pione-notification-listener` command.

Public Class Methods

new(cmd) click to toggle source
Calls superclass method Pione::Front::BasicFront::new
# File lib/pione/front/notification-listener-front.rb, line 6
def initialize(cmd)
  super(cmd, Global.notification_listener_front_port)
end

Public Instance Methods

add(uri) click to toggle source

Add the recipient that receives notification messages.

@param uri [String]

URI of the recipent's front

@param recipient [Notification::Recipient]

the recipient that receives notification messages

@return [void]

# File lib/pione/front/notification-listener-front.rb, line 17
def add(uri)
  non_blocking do
    @cmd.model.add_recipient(uri)
    Log::SystemLog.debug 'Recipient "%s" has been added.' % uri
  end
end
delete(uri) click to toggle source

Delete the recipient that receives notification messages.

@param uri [String]

URI of the recipent's front
# File lib/pione/front/notification-listener-front.rb, line 28
def delete(uri)
  non_blocking do
    @cmd.model.delete_recipient(uri)
    Log::SystemLog.debug 'Recipient "%s" has been deleted.' % uri
  end
end