Module: AgentXmpp
- Defined in:
- lib/agent_xmpp/xmpp/iq.rb,
lib/agent_xmpp/main.rb,
lib/agent_xmpp/config.rb,
lib/agent_xmpp/app/boot.rb,
lib/agent_xmpp/xmpp/jid.rb,
lib/agent_xmpp/xmpp/sasl.rb,
lib/agent_xmpp/xmpp/stanza.rb,
lib/agent_xmpp/xmpp/x_data.rb,
lib/agent_xmpp/patches/hash.rb,
lib/agent_xmpp/xmpp/element.rb,
lib/agent_xmpp/xmpp/message.rb,
lib/agent_xmpp/client/client.rb,
lib/agent_xmpp/patches/array.rb,
lib/agent_xmpp/patches/float.rb,
lib/agent_xmpp/xmpp/iq_disco.rb,
lib/agent_xmpp/xmpp/presence.rb,
lib/agent_xmpp/app/controller.rb,
lib/agent_xmpp/patches/object.rb,
lib/agent_xmpp/patches/string.rb,
lib/agent_xmpp/xmpp/iq_pubsub.rb,
lib/agent_xmpp/xmpp/iq_roster.rb,
lib/agent_xmpp/client/response.rb,
lib/agent_xmpp/xmpp/iq_command.rb,
lib/agent_xmpp/xmpp/iq_version.rb,
lib/agent_xmpp/client/connection.rb,
lib/agent_xmpp/client/message_pipe.rb,
lib/agent_xmpp/client/roster_model.rb,
lib/agent_xmpp/xmpp/error_response.rb,
lib/agent_xmpp/client/publish_model.rb,
lib/agent_xmpp/client/services_model.rb,
lib/agent_xmpp/client/message_delegate.rb
Overview
Original from XMPP4R - XMPP Library for Ruby Website::home.gna.org/xmpp4r/
Defined Under Namespace
Modules: Delegator, StandardLibrary, Xmpp Classes: AgentXmppError, BaseController, Boot, Client, Connection, Controller, MessageDelegate, MessagePipe, PublishModel, PublishNode, Response, RosterItemModel, RosterModel, ServicesModel
Constant Summary collapse
- VERSION =
.….….….….….….….….….….….….….….….….….….….….….….….….….….
"0.0.0"
- AGENT_XMPP_NAME =
'AgentXMPP'
- OS_VERSION =
IO.popen('uname -sr').readlines.to_s.strip
- SUBSCRIBE_RETRY_PERIOD =
60
- IDENTITY =
{:category => 'client', :name => AGENT_XMPP_NAME, :type => 'bot'}
- FEATURES =
['http://jabber.org/protocol/disco#info', 'http://jabber.org/protocol/disco#items', 'jabber:iq:version', 'jabber:x:data', 'http://jabber.org/protocol/commands', 'http://jabber.org/protocol/muc']
- DEFAULT_PUBSUB_CONFIG =
{ :title => 'event', :access_model => 'presence', :publish_model => 'publishers', :max_items => 20, :deliver_notifications => 1, :deliver_payloads => 1, :persist_items => 1, :subscribe => 1, :notify_config => 0, :notify_delete => 0, :notify_retract => 0, }
Class Attribute Summary collapse
-
.app_path ⇒ Object
Returns the value of attribute app_path.
-
.config ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.config_file ⇒ Object
Returns the value of attribute config_file.
-
.log_file ⇒ Object
Returns the value of attribute log_file.
Class Method Summary collapse
-
.jid ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.jid=(jid) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
- .logger ⇒ Object
- .logger=(logger) ⇒ Object
-
.password ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.port ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.priority ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.published ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.pubsub_root ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.resource ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.roster ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.services ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
.user_pubsub_root ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
Class Attribute Details
.app_path ⇒ Object
Returns the value of attribute app_path.
36 37 38 |
# File 'lib/agent_xmpp/config.rb', line 36 def app_path @app_path end |
.config ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
24 25 26 |
# File 'lib/agent_xmpp/main.rb', line 24 def config @config end |
.config_file ⇒ Object
Returns the value of attribute config_file.
36 37 38 |
# File 'lib/agent_xmpp/config.rb', line 36 def config_file @config_file end |
.log_file ⇒ Object
Returns the value of attribute log_file.
36 37 38 |
# File 'lib/agent_xmpp/config.rb', line 36 def log_file @log_file end |
Class Method Details
.jid ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
52 53 54 |
# File 'lib/agent_xmpp/main.rb', line 52 def jid @jid ||= Xmpp::Jid.new("#{config['jid']}/#{resource}") end |
.jid=(jid) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
57 58 59 |
# File 'lib/agent_xmpp/main.rb', line 57 def jid=(jid) @jid = jid end |
.logger ⇒ Object
37 |
# File 'lib/agent_xmpp/config.rb', line 37 def logger; @logger ||= Logger.new(STDOUT); end |
.logger=(logger) ⇒ Object
38 |
# File 'lib/agent_xmpp/config.rb', line 38 def logger=(logger); @logger = logger; end |
.password ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
72 73 74 |
# File 'lib/agent_xmpp/main.rb', line 72 def password config['password'] end |
.port ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
67 68 69 |
# File 'lib/agent_xmpp/main.rb', line 67 def port config['port'] || 5222 end |
.priority ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/agent_xmpp/main.rb', line 77 def priority @priority ||= if config['priority'] if config['priority'] < -127 -127 elsif config['priority'] > 128 128 else config['priority'] end else; 1; end end |
.published ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
47 48 49 |
# File 'lib/agent_xmpp/main.rb', line 47 def published @published ||= PublishModel.new(config['publish']) end |
.pubsub_root ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
32 33 34 |
# File 'lib/agent_xmpp/main.rb', line 32 def pubsub_root @pubsub_root ||= "/home/#{AgentXmpp.jid.domain}" end |
.resource ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
62 63 64 |
# File 'lib/agent_xmpp/main.rb', line 62 def resource config['resource'] || Socket.gethostname end |
.roster ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
27 28 29 |
# File 'lib/agent_xmpp/main.rb', line 27 def roster @roster ||= RosterModel.new(jid, config['roster']) end |
.services ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
42 43 44 |
# File 'lib/agent_xmpp/main.rb', line 42 def services @services ||= ServicesModel.new end |