Class: RestFtpDaemon::Notification
- Inherits:
-
Object
- Object
- RestFtpDaemon::Notification
- Includes:
- LoggerHelper
- Defined in:
- lib/rest-ftp-daemon/notification.rb
Overview
Handles a notification POST using a dedicated thread
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#job ⇒ Object
Returns the value of attribute job.
-
#job_id ⇒ Object
Returns the value of attribute job_id.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#message ⇒ Object
Returns the value of attribute message.
-
#signal ⇒ Object
Returns the value of attribute signal.
-
#status ⇒ Object
Returns the value of attribute status.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, params) ⇒ Notification
constructor
A new instance of Notification.
Constructor Details
#initialize(url, params) ⇒ Notification
Returns a new instance of Notification.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rest-ftp-daemon/notification.rb', line 16 def initialize url, params # Remember params @url = url @params = params # Generate a random key @id = Helpers.identifier(NOTIFY_IDENTIFIER_LEN) @jid = nil # Logger @logger = RestFtpDaemon::LoggerPool.instance.get :notify # Handle the notification log_info "initialized [#{@url}]" process end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
10 11 12 |
# File 'lib/rest-ftp-daemon/notification.rb', line 10 def error @error end |
#job ⇒ Object
Returns the value of attribute job.
14 15 16 |
# File 'lib/rest-ftp-daemon/notification.rb', line 14 def job @job end |
#job_id ⇒ Object
Returns the value of attribute job_id.
8 9 10 |
# File 'lib/rest-ftp-daemon/notification.rb', line 8 def job_id @job_id end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/rest-ftp-daemon/notification.rb', line 6 def logger @logger end |
#message ⇒ Object
Returns the value of attribute message.
11 12 13 |
# File 'lib/rest-ftp-daemon/notification.rb', line 11 def @message end |
#signal ⇒ Object
Returns the value of attribute signal.
9 10 11 |
# File 'lib/rest-ftp-daemon/notification.rb', line 9 def signal @signal end |
#status ⇒ Object
Returns the value of attribute status.
12 13 14 |
# File 'lib/rest-ftp-daemon/notification.rb', line 12 def status @status end |
#url ⇒ Object
Returns the value of attribute url.
13 14 15 |
# File 'lib/rest-ftp-daemon/notification.rb', line 13 def url @url end |