Class: RbEAI::IOTask

Inherits:
Task
  • Object
show all
Defined in:
lib/rbeai/TasksLogic.rb

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>

Direct Known Subclasses

GetTask, PutTask

Instance Attribute Summary collapse

Attributes inherited from Task

#name, #nextTask, #size, #status, #wflow

Instance Method Summary collapse

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

#filesObject

Returns the value of attribute files.



183
184
185
# File 'lib/rbeai/TasksLogic.rb', line 183

def files
  @files
end

#locationObject

Returns the value of attribute location.



183
184
185
# File 'lib/rbeai/TasksLogic.rb', line 183

def location
  @location
end

#patternObject

Returns the value of attribute pattern.



183
184
185
# File 'lib/rbeai/TasksLogic.rb', line 183

def pattern
  @pattern
end

#rateObject

Returns the value of attribute rate.



183
184
185
# File 'lib/rbeai/TasksLogic.rb', line 183

def rate
  @rate
end