2 # Connector plugins handle the communications with the middleware, you can provide your own to speak
3 # to something other than Stomp, your plugins must inherit from MCollective::Connector::Base and should
4 # provide the following methods:
6 # connect - Creates a connection to the middleware, no arguments should get its parameters from the config
7 # receive - Receive data from the middleware, should act like a blocking call only returning if/when data
8 # was received. It should get data from all subscribed channels/topics. Individual messages
9 # should be returned as MCollective::Request objects with the payload provided
10 # publish - Takes a target and msg, should send the message to the supplied target topic or destination
11 # subscribe - Adds a subscription to a specific message source
12 # unsubscribe - Removes a subscription to a specific message source
13 # disconnect - Disconnects from the middleware
15 # These methods are all that's needed for a new connector protocol and should hopefully be simple
16 # enough to not have tied us to Stomp.
19 def self.inherited(klass)
20 PluginManager << {:type => "connector_plugin", :class => klass.to_s}