Sha256: 5e175b884f7555d03220804f46ee42056cac6d072cf73ab4ef93e6da5e35b744

Contents?: true

Size: 1.41 KB

Versions: 20

Compression:

Stored size: 1.41 KB

Contents

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
choria-mcorpc-support-2.26.5 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.26.4 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.26.3 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.26.2 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.26.1 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.26.0 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.25.3 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.25.2 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.25.1 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.25.0 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.24.4 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.24.3 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.24.2 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.24.1 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.24.0 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.23.3 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.23.2 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.23.1 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.23.0 lib/mcollective/connector/base.rb
choria-mcorpc-support-2.23.0.pre lib/mcollective/connector/base.rb