Class: RbEAI::IOTask
Overview
<task name=“getfile” type=“Get” rate=“1s” pool=“2”> <!– Valid units are: ‘s’, ‘m’, ‘h’ –>
<next>final</next>
<protocol def="file"> <!-- Valid protocols are: 'file', 'pop3', 'http', 'ftp', 'queue' -->
<location>.</location>
<pattern>test*.txt</pattern>
</protocol>
</task>
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
-
#location ⇒ Object
Returns the value of attribute location.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#rate ⇒ Object
Returns the value of attribute rate.
Attributes inherited from Task
#name, #nextTask, #size, #status, #wflow
Instance Method Summary collapse
-
#initialize(wflow, xmlFull, xmlDoc) ⇒ IOTask
constructor
A new instance of IOTask.
Methods inherited from Task
#doJob, #getItemsNext, #persist, #persistFtp, #persistStr
Constructor Details
#initialize(wflow, xmlFull, xmlDoc) ⇒ IOTask
Returns a new instance of IOTask.
187 188 189 190 191 192 |
# File 'lib/rbeai/TasksLogic.rb', line 187 def initialize(wflow, xmlFull, xmlDoc) super(wflow, xmlFull, xmlDoc) @location = XPath.first(xmlDoc, "./protocol/location/text()") @pattern = XPath.first(xmlDoc, "./protocol/pattern/text()") @rate = _getRate(xmlDoc.attributes["rate"]) end |
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files.
183 184 185 |
# File 'lib/rbeai/TasksLogic.rb', line 183 def files @files end |
#location ⇒ Object
Returns the value of attribute location.
183 184 185 |
# File 'lib/rbeai/TasksLogic.rb', line 183 def location @location end |
#pattern ⇒ Object
Returns the value of attribute pattern.
183 184 185 |
# File 'lib/rbeai/TasksLogic.rb', line 183 def pattern @pattern end |
#rate ⇒ Object
Returns the value of attribute rate.
183 184 185 |
# File 'lib/rbeai/TasksLogic.rb', line 183 def rate @rate end |