Class: Nagios::MkLiveStatus::Wait::Timeout

Inherits:
Nagios::MkLiveStatus::Wait show all
Includes:
Nagios::MkLiveStatus
Defined in:
lib/nagios_mklivestatus/wait/timeout.rb

Overview

This class is used to make a wait timeout.

Author

Esco-lan Team ([email protected])

Copyright

Copyright © 2012 GIP RECIA

License

General Public Licence

Instance Method Summary collapse

Methods included from Nagios::MkLiveStatus

init, #logger

Constructor Details

#initialize(timeout) ⇒ Timeout

Create a new wait timeout expression. _Timeout in millisecond_



14
15
16
17
18
19
20
21
# File 'lib/nagios_mklivestatus/wait/timeout.rb', line 14

def initialize(timeout)
  if not timeout
    raise QueryException.new("The timeout must be set for the wait operation.")
  end
  
  @timeout = timeout
  
end

Instance Method Details

#to_sObject

Convert the current timeout expression into a nagios query string.

WaitTimeout: ...


27
28
29
# File 'lib/nagios_mklivestatus/wait/timeout.rb', line 27

def to_s
   return "WaitTimeout: "+@timeout
end