Class: FreeMessageQueue::FileQueue
- Defined in:
- lib/fmq/queues/file.rb
Overview
This queue returns everytime the same file. This is useful during debugging or to serve the admin page.
configuration sample:
queue-manager:
auto-create-queues: true
defined-queues:
admin-page-index:
path: /admin/index
class: FreeMessageQueue::FileQueue
file: admin-interface/index.html
content-type: text/html
NOTE the put method is not implemented in this queue. It is a poll only queue.
Constant Summary
Constants inherited from BaseQueue
Instance Attribute Summary
Attributes inherited from BaseQueue
#bytes, #manager, #max_messages, #max_size, #size
Instance Method Summary collapse
-
#content_type=(type) ⇒ Object
CONFIGURATION OPTION sets the content_type of the file.
-
#file=(path) ⇒ Object
CONFIGURATION OPTION sets the path to the file that should be read.
-
#poll ⇒ Object
Return the file and content type.
Methods inherited from BaseQueue
Constructor Details
This class inherits a constructor from FreeMessageQueue::BaseQueue
Instance Method Details
#content_type=(type) ⇒ Object
CONFIGURATION OPTION sets the content_type of the file. This option make sense if you want to test with the webbrowser.
56 57 58 |
# File 'lib/fmq/queues/file.rb', line 56 def content_type=(type) @content_type = type end |
#file=(path) ⇒ Object
CONFIGURATION OPTION sets the path to the file that should be read
49 50 51 |
# File 'lib/fmq/queues/file.rb', line 49 def file=(path) @file_path = path end |