Module | OpenWFE::WorkItemListener |
In: |
lib/openwfe/listeners/listener.rb
|
this mixin module provides two protected methods, handle_item() and filter_item(). They can be easily overriden to add some special behaviours.
The base implementation is just empty, feel free to override it if you need to filter workitems.
One example :
class MyListener include WorkItemListener protected # # MyListener doesn't accept launchitems # def filter_items (item) raise "launchitems not allowed" # if item.is_a?(OpenWFE::LaunchItem) end end
# File lib/openwfe/listeners/listener.rb, line 88 88: def filter_items (item) 89: 90: #raise( 91: # "listener of class '#{self.class.name}' "+ 92: # "doesn't accept launchitems") 93: end