Module: Pione::Notification::Address

Defined in:
lib/pione/notification/address.rb

Overview

Nofitication::Address provides utility methods for notification addresses.

Constant Summary collapse

MULTICAST_ADDRESS =
IPAddr.new("224.0.0.0/4")

Class Method Summary collapse

Class Method Details

.default_receiver_addressObject

Return default receiver address.



35
36
37
38
39
40
# File 'lib/pione/notification/address.rb', line 35

def default_receiver_address
  host_and_port_to_uri(
    Global.default_notification_receiver_host,
    Global.default_notification_receiver_port
  )
end

.default_target_addressObject

Return default target address.



27
28
29
30
31
32
# File 'lib/pione/notification/address.rb', line 27

def default_target_address
  host_and_port_to_uri(
    Global.default_notification_target_host,
    Global.default_notification_target_port
  )
end

.receiver_address_to_uri(address) ⇒ Object

Convert the receiver address to URI.



18
19
20
21
22
23
24
# File 'lib/pione/notification/address.rb', line 18

def receiver_address_to_uri(address)
  address_to_uri(
    address,
    Global.default_notification_receiver_host,
    Global.default_notification_receiver_port
  )
end

.target_address_to_uri(address) ⇒ Object

Convert the target address to URI.



9
10
11
12
13
14
15
# File 'lib/pione/notification/address.rb', line 9

def target_address_to_uri(address)
  address_to_uri(
    address,
    Global.default_notification_target_host,
    Global.default_notification_target_port
  )
end