Update version according to OSCI-883
[packages/precise/mcollective.git] / doc / classes / MCollective / Message.html
diff --git a/doc/classes/MCollective/Message.html b/doc/classes/MCollective/Message.html
deleted file mode 100644 (file)
index f8583ae..0000000
+++ /dev/null
@@ -1,728 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html 
-     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-  <title>Class: MCollective::Message</title>
-  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-  <meta http-equiv="Content-Script-Type" content="text/javascript" />
-  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
-  <script type="text/javascript">
-  // <![CDATA[
-
-  function popupCode( url ) {
-    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
-  }
-
-  function toggleCode( id ) {
-    if ( document.getElementById )
-      elem = document.getElementById( id );
-    else if ( document.all )
-      elem = eval( "document.all." + id );
-    else
-      return false;
-
-    elemStyle = elem.style;
-    
-    if ( elemStyle.display != "block" ) {
-      elemStyle.display = "block"
-    } else {
-      elemStyle.display = "none"
-    }
-
-    return true;
-  }
-  
-  // Make codeblocks hidden by default
-  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
-  
-  // ]]>
-  </script>
-
-</head>
-<body>
-
-
-
-    <div id="classHeader">
-        <table class="header-table">
-        <tr class="top-aligned-row">
-          <td><strong>Class</strong></td>
-          <td class="class-name-in-header">MCollective::Message</td>
-        </tr>
-        <tr class="top-aligned-row">
-            <td><strong>In:</strong></td>
-            <td>
-                <a href="../../files/lib/mcollective/message_rb.html">
-                lib/mcollective/message.rb
-                </a>
-        <br />
-            </td>
-        </tr>
-
-        <tr class="top-aligned-row">
-            <td><strong>Parent:</strong></td>
-            <td>
-                Object
-            </td>
-        </tr>
-        </table>
-    </div>
-  <!-- banner header -->
-
-  <div id="bodyContent">
-
-
-
-  <div id="contextContent">
-
-    <div id="description">
-      <p>
-container for a message, its headers, agent, collective and other meta data
-</p>
-
-    </div>
-
-
-   </div>
-
-    <div id="method-list">
-      <h3 class="section-bar">Methods</h3>
-
-      <div class="name-list">
-      <a href="#M000338">base64?</a>&nbsp;&nbsp;
-      <a href="#M000336">base64_decode!</a>&nbsp;&nbsp;
-      <a href="#M000337">base64_encode!</a>&nbsp;&nbsp;
-      <a href="#M000344">create_reqid</a>&nbsp;&nbsp;
-      <a href="#M000341">decode!</a>&nbsp;&nbsp;
-      <a href="#M000339">encode!</a>&nbsp;&nbsp;
-      <a href="#M000335">expected_msgid=</a>&nbsp;&nbsp;
-      <a href="#M000332">new</a>&nbsp;&nbsp;
-      <a href="#M000343">publish</a>&nbsp;&nbsp;
-      <a href="#M000334">reply_to=</a>&nbsp;&nbsp;
-      <a href="#M000333">type=</a>&nbsp;&nbsp;
-      <a href="#M000342">validate</a>&nbsp;&nbsp;
-      <a href="#M000340">validate_compound_filter</a>&nbsp;&nbsp;
-      </div>
-    </div>
-
-  </div>
-
-
-    <!-- if includes -->
-
-    <div id="section">
-
-
-    <div id="constants-list">
-      <h3 class="section-bar">Constants</h3>
-
-      <div class="name-list">
-        <table summary="Constants">
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">VALIDTYPES</td>
-          <td>=</td>
-          <td class="context-item-value">[:message, :request, :direct_request, :reply]</td>
-        </tr>
-        </table>
-      </div>
-    </div>
-
-
-
-    <div id="attribute-list">
-      <h3 class="section-bar">Attributes</h3>
-
-      <div class="name-list">
-        <table>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">agent</td>
-          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">collective</td>
-          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">discovered_hosts</td>
-          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">expected_msgid</td>
-          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">filter</td>
-          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">headers</td>
-          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">message</td>
-          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">msgtime</td>
-          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">options</td>
-          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">payload</td>
-          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">reply_to</td>
-          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">request</td>
-          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">requestid</td>
-          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">ttl</td>
-          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">type</td>
-          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        <tr class="top-aligned-row context-row">
-          <td class="context-item-name">validated</td>
-          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
-          <td class="context-item-desc"></td>
-        </tr>
-        </table>
-      </div>
-    </div>
-      
-
-
-    <!-- if method_list -->
-    <div id="methods">
-      <h3 class="section-bar">Public Class methods</h3>
-
-      <div id="method-M000332" class="method-detail">
-        <a name="M000332"></a>
-
-        <div class="method-heading">
-          <a href="#M000332" class="method-signature">
-          <span class="method-name">new</span><span class="method-args">(payload, message, options = {})</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p>
-payload - the message body without headers etc, just the text message - the
-original message received from the middleware options[:base64] - if the
-body base64 encoded? options[:agent] - the agent the message is for/from
-options[:collective] - the collective its for/from options[:headers] - the
-message headers options[:type] - an indicator about the type of message,
-:message, :request, :direct_request or :reply options[:request] - if this
-is a reply this should old the message we are replying to options[:filter]
-- for requests, the filter to encode into the message options[:options] -
-the normal client options hash options[:ttl] - the maximum amount of
-seconds this message can be valid for options[:expected_msgid] - in the
-case of replies this is the msgid it is expecting in the replies
-options[:requestid] - specific request id to use else one will be generated
-</p>
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000332-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000332-source">
-<pre>
-    <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 23</span>
-23:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">payload</span>, <span class="ruby-identifier">message</span>, <span class="ruby-identifier">options</span> = {})
-24:       <span class="ruby-identifier">options</span> = {<span class="ruby-identifier">:base64</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
-25:                  <span class="ruby-identifier">:agent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">nil</span>,
-26:                  <span class="ruby-identifier">:headers</span> =<span class="ruby-operator">&gt;</span> {},
-27:                  <span class="ruby-identifier">:type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:message</span>,
-28:                  <span class="ruby-identifier">:request</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">nil</span>,
-29:                  <span class="ruby-identifier">:filter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Util</span>.<span class="ruby-identifier">empty_filter</span>,
-30:                  <span class="ruby-identifier">:options</span> =<span class="ruby-operator">&gt;</span> {},
-31:                  <span class="ruby-identifier">:ttl</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">60</span>,
-32:                  <span class="ruby-identifier">:expected_msgid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">nil</span>,
-33:                  <span class="ruby-identifier">:requestid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">nil</span>,
-34:                  <span class="ruby-identifier">:collective</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">nil</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
-35: 
-36:       <span class="ruby-ivar">@payload</span> = <span class="ruby-identifier">payload</span>
-37:       <span class="ruby-ivar">@message</span> = <span class="ruby-identifier">message</span>
-38:       <span class="ruby-ivar">@requestid</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:requestid</span>]
-39:       <span class="ruby-ivar">@discovered_hosts</span> = <span class="ruby-keyword kw">nil</span>
-40:       <span class="ruby-ivar">@reply_to</span> = <span class="ruby-keyword kw">nil</span>
-41: 
-42:       <span class="ruby-ivar">@type</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:type</span>]
-43:       <span class="ruby-ivar">@headers</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:headers</span>]
-44:       <span class="ruby-ivar">@base64</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:base64</span>]
-45:       <span class="ruby-ivar">@filter</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:filter</span>]
-46:       <span class="ruby-ivar">@expected_msgid</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:expected_msgid</span>]
-47:       <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:options</span>]
-48: 
-49:       <span class="ruby-ivar">@ttl</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:ttl</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Config</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">ttl</span>
-50:       <span class="ruby-ivar">@msgtime</span> = <span class="ruby-value">0</span>
-51: 
-52:       <span class="ruby-ivar">@validated</span> = <span class="ruby-keyword kw">false</span>
-53: 
-54:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:request</span>]
-55:         <span class="ruby-ivar">@request</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:request</span>]
-56:         <span class="ruby-ivar">@agent</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">agent</span>
-57:         <span class="ruby-ivar">@collective</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">collective</span>
-58:         <span class="ruby-ivar">@type</span> = <span class="ruby-identifier">:reply</span>
-59:       <span class="ruby-keyword kw">else</span>
-60:         <span class="ruby-ivar">@agent</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:agent</span>]
-61:         <span class="ruby-ivar">@collective</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:collective</span>]
-62:       <span class="ruby-keyword kw">end</span>
-63: 
-64:       <span class="ruby-identifier">base64_decode!</span>
-65:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <h3 class="section-bar">Public Instance methods</h3>
-
-      <div id="method-M000338" class="method-detail">
-        <a name="M000338"></a>
-
-        <div class="method-heading">
-          <a href="#M000338" class="method-signature">
-          <span class="method-name">base64?</span><span class="method-args">()</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000338-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000338-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 129</span>
-129:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base64?</span>
-130:       <span class="ruby-ivar">@base64</span>
-131:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000336" class="method-detail">
-        <a name="M000336"></a>
-
-        <div class="method-heading">
-          <a href="#M000336" class="method-signature">
-          <span class="method-name">base64_decode!</span><span class="method-args">()</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000336-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000336-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 115</span>
-115:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base64_decode!</span>
-116:       <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@base64</span>
-117: 
-118:       <span class="ruby-ivar">@payload</span> = <span class="ruby-constant">SSL</span>.<span class="ruby-identifier">base64_decode</span>(<span class="ruby-ivar">@payload</span>)
-119:       <span class="ruby-ivar">@base64</span> = <span class="ruby-keyword kw">false</span>
-120:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000337" class="method-detail">
-        <a name="M000337"></a>
-
-        <div class="method-heading">
-          <a href="#M000337" class="method-signature">
-          <span class="method-name">base64_encode!</span><span class="method-args">()</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000337-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000337-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 122</span>
-122:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base64_encode!</span>
-123:       <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@base64</span>
-124: 
-125:       <span class="ruby-ivar">@payload</span> = <span class="ruby-constant">SSL</span>.<span class="ruby-identifier">base64_encode</span>(<span class="ruby-ivar">@payload</span>)
-126:       <span class="ruby-ivar">@base64</span> = <span class="ruby-keyword kw">true</span>
-127:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000344" class="method-detail">
-        <a name="M000344"></a>
-
-        <div class="method-heading">
-          <a href="#M000344" class="method-signature">
-          <span class="method-name">create_reqid</span><span class="method-args">()</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000344-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000344-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 226</span>
-226:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_reqid</span>
-227:       <span class="ruby-comment cmt"># we gsub out the -s so that the format of the id does not</span>
-228:       <span class="ruby-comment cmt"># change from previous versions, these should just be more</span>
-229:       <span class="ruby-comment cmt"># unique than previous ones</span>
-230:       <span class="ruby-constant">SSL</span>.<span class="ruby-identifier">uuid</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;-&quot;</span>, <span class="ruby-value str">&quot;&quot;</span>)
-231:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000341" class="method-detail">
-        <a name="M000341"></a>
-
-        <div class="method-heading">
-          <a href="#M000341" class="method-signature">
-          <span class="method-name">decode!</span><span class="method-args">()</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000341-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000341-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 175</span>
-175:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decode!</span>
-176:       <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Cannot decode message type #{type}&quot;</span> <span class="ruby-keyword kw">unless</span> [<span class="ruby-identifier">:request</span>, <span class="ruby-identifier">:reply</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">type</span>)
-177: 
-178:       <span class="ruby-ivar">@payload</span> = <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">&quot;security_plugin&quot;</span>].<span class="ruby-identifier">decodemsg</span>(<span class="ruby-keyword kw">self</span>)
-179: 
-180:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:request</span>
-181:         <span class="ruby-identifier">raise</span> <span class="ruby-value str">'callerid in request is not valid, surpressing reply to potentially forged request'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">&quot;security_plugin&quot;</span>].<span class="ruby-identifier">valid_callerid?</span>(<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:callerid</span>])
-182:       <span class="ruby-keyword kw">end</span>
-183: 
-184:       [<span class="ruby-identifier">:collective</span>, <span class="ruby-identifier">:agent</span>, <span class="ruby-identifier">:filter</span>, <span class="ruby-identifier">:requestid</span>, <span class="ruby-identifier">:ttl</span>, <span class="ruby-identifier">:msgtime</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span><span class="ruby-operator">|</span>
-185:         <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{prop}&quot;</span>, <span class="ruby-identifier">payload</span>[<span class="ruby-identifier">prop</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">payload</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">prop</span>)
-186:       <span class="ruby-keyword kw">end</span>
-187:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000339" class="method-detail">
-        <a name="M000339"></a>
-
-        <div class="method-heading">
-          <a href="#M000339" class="method-signature">
-          <span class="method-name">encode!</span><span class="method-args">()</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000339-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000339-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 133</span>
-133:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode!</span>
-134:       <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">type</span>
-135:         <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:reply</span>
-136:           <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Cannot encode a reply message if no request has been associated with it&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">request</span>
-137:           <span class="ruby-identifier">raise</span> <span class="ruby-value str">'callerid in original request is not valid, surpressing reply to potentially forged request'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">&quot;security_plugin&quot;</span>].<span class="ruby-identifier">valid_callerid?</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:callerid</span>])
-138: 
-139:           <span class="ruby-ivar">@requestid</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:requestid</span>]
-140:           <span class="ruby-ivar">@payload</span> = <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">&quot;security_plugin&quot;</span>].<span class="ruby-identifier">encodereply</span>(<span class="ruby-identifier">agent</span>, <span class="ruby-identifier">payload</span>, <span class="ruby-identifier">requestid</span>, <span class="ruby-identifier">request</span>.<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:callerid</span>])
-141:         <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:request</span>, <span class="ruby-identifier">:direct_request</span>
-142:           <span class="ruby-identifier">validate_compound_filter</span>(<span class="ruby-ivar">@filter</span>[<span class="ruby-value str">&quot;compound&quot;</span>]) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@filter</span>[<span class="ruby-value str">&quot;compound&quot;</span>].<span class="ruby-identifier">empty?</span>
-143: 
-144:           <span class="ruby-ivar">@requestid</span> = <span class="ruby-identifier">create_reqid</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@requestid</span>
-145:           <span class="ruby-ivar">@payload</span> = <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">&quot;security_plugin&quot;</span>].<span class="ruby-identifier">encoderequest</span>(<span class="ruby-constant">Config</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">identity</span>, <span class="ruby-identifier">payload</span>, <span class="ruby-identifier">requestid</span>, <span class="ruby-identifier">filter</span>, <span class="ruby-identifier">agent</span>, <span class="ruby-identifier">collective</span>, <span class="ruby-identifier">ttl</span>)
-146:         <span class="ruby-keyword kw">else</span>
-147:           <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Cannot encode #{type} messages&quot;</span>
-148:       <span class="ruby-keyword kw">end</span>
-149:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000335" class="method-detail">
-        <a name="M000335"></a>
-
-        <div class="method-heading">
-          <a href="#M000335" class="method-signature">
-          <span class="method-name">expected_msgid=</span><span class="method-args">(msgid)</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p>
-in the case of reply messages we are expecting replies to a previously
-created message. This stores a hint to that previously sent message id and
-can be used by other classes like the security plugins as a means of
-optimizing their behavior like by ignoring messages not directed at us.
-</p>
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000335-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000335-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 110</span>
-110:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">expected_msgid=</span>(<span class="ruby-identifier">msgid</span>)
-111:       <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Can only store the expected msgid for reply messages&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:reply</span>
-112:       <span class="ruby-ivar">@expected_msgid</span> = <span class="ruby-identifier">msgid</span>
-113:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000343" class="method-detail">
-        <a name="M000343"></a>
-
-        <div class="method-heading">
-          <a href="#M000343" class="method-signature">
-          <span class="method-name">publish</span><span class="method-args">()</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p>
-<a href="Message.html#M000343">publish</a> a reply message by creating a
-target name and sending it
-</p>
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000343-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000343-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 213</span>
-213:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">publish</span>
-214:       <span class="ruby-comment cmt"># If we've been specificaly told about hosts that were discovered</span>
-215:       <span class="ruby-comment cmt"># use that information to do P2P calls if appropriate else just</span>
-216:       <span class="ruby-comment cmt"># send it as is.</span>
-217:       <span class="ruby-identifier">config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">instance</span>
-218:       <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@discovered_hosts</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">direct_addressing</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-ivar">@discovered_hosts</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">direct_addressing_threshold</span>)
-219:         <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type</span> = <span class="ruby-identifier">:direct_request</span>
-220:         <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">&quot;Handling #{requestid} as a direct request&quot;</span>)
-221:       <span class="ruby-keyword kw">end</span>
-222: 
-223:       <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">'connector_plugin'</span>].<span class="ruby-identifier">publish</span>(<span class="ruby-keyword kw">self</span>)
-224:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000334" class="method-detail">
-        <a name="M000334"></a>
-
-        <div class="method-heading">
-          <a href="#M000334" class="method-signature">
-          <span class="method-name">reply_to=</span><span class="method-args">(target)</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p>
-Sets a custom reply-to target for requests. The connector plugin should
-inspect this when constructing requests and set this header ensuring
-replies will go to the custom target otherwise the connector should just do
-what it usually does
-</p>
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000334-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000334-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 99</span>
- 99:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reply_to=</span>(<span class="ruby-identifier">target</span>)
-100:       <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Custom reply targets can only be set on requests&quot;</span> <span class="ruby-keyword kw">unless</span> [<span class="ruby-identifier">:request</span>, <span class="ruby-identifier">:direct_request</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-ivar">@type</span>)
-101: 
-102:       <span class="ruby-ivar">@reply_to</span> = <span class="ruby-identifier">target</span>
-103:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000333" class="method-detail">
-        <a name="M000333"></a>
-
-        <div class="method-heading">
-          <a href="#M000333" class="method-signature">
-          <span class="method-name">type=</span><span class="method-args">(type)</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p>
-Sets the message type to one of the known types. In the case of
-:direct_request the list of hosts to communicate with should have been set
-with discovered_hosts else an exception will be raised. This is for extra
-security, we never accidentally want to send a direct request without a
-list of hosts or something weird like that as it might result in a
-filterless broadcast being sent.
-</p>
-<p>
-Additionally you simply cannot set :direct_request if direct_addressing was
-not enabled this is to force a workflow that doesnt not yield in a mistake
-when someone might assume direct_addressing is enabled when its not.
-</p>
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000333-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000333-source">
-<pre>
-    <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 76</span>
-76:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type=</span>(<span class="ruby-identifier">type</span>)
-77:       <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unknown message type #{type}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">VALIDTYPES</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">type</span>)
-78: 
-79:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:direct_request</span>
-80:         <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Direct requests is not enabled using the direct_addressing config option&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">Config</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">direct_addressing</span>
-81: 
-82:         <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@discovered_hosts</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@discovered_hosts</span>.<span class="ruby-identifier">empty?</span>
-83:           <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Can only set type to :direct_request if discovered_hosts have been set&quot;</span>
-84:         <span class="ruby-keyword kw">end</span>
-85: 
-86:         <span class="ruby-comment cmt"># clear out the filter, custom discovery sources might interpret the filters</span>
-87:         <span class="ruby-comment cmt"># different than the remote mcollectived and in directed mode really the only</span>
-88:         <span class="ruby-comment cmt"># filter that matters is the agent filter</span>
-89:         <span class="ruby-ivar">@filter</span> = <span class="ruby-constant">Util</span>.<span class="ruby-identifier">empty_filter</span>
-90:         <span class="ruby-ivar">@filter</span>[<span class="ruby-value str">&quot;agent&quot;</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@agent</span>
-91:       <span class="ruby-keyword kw">end</span>
-92: 
-93:       <span class="ruby-ivar">@type</span> = <span class="ruby-identifier">type</span>
-94:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000342" class="method-detail">
-        <a name="M000342"></a>
-
-        <div class="method-heading">
-          <a href="#M000342" class="method-signature">
-          <span class="method-name">validate</span><span class="method-args">()</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p>
-Perform validation against the message by checking filters and ttl
-</p>
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000342-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000342-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 190</span>
-190:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>
-191:       <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Can only validate request messages&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:request</span>
-192: 
-193:       <span class="ruby-identifier">msg_age</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">msgtime</span>
-194: 
-195:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">msg_age</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ttl</span>
-196:         <span class="ruby-identifier">cid</span> = <span class="ruby-value str">&quot;&quot;</span>
-197:         <span class="ruby-identifier">cid</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:callerid</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;@&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">payload</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:callerid</span>)
-198:         <span class="ruby-identifier">cid</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:senderid</span>]
-199: 
-200:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">msg_age</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ttl</span>
-201:           <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">&quot;global_stats&quot;</span>].<span class="ruby-identifier">ttlexpired</span>
-202: 
-203:           <span class="ruby-identifier">raise</span>(<span class="ruby-constant">MsgTTLExpired</span>, <span class="ruby-node">&quot;message #{requestid} from #{cid} created at #{msgtime} is #{msg_age} seconds old, TTL is #{ttl}&quot;</span>)
-204:         <span class="ruby-keyword kw">end</span>
-205:       <span class="ruby-keyword kw">end</span>
-206: 
-207:       <span class="ruby-identifier">raise</span>(<span class="ruby-constant">NotTargettedAtUs</span>, <span class="ruby-value str">&quot;Received message is not targetted to us&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">PluginManager</span>[<span class="ruby-value str">&quot;security_plugin&quot;</span>].<span class="ruby-identifier">validate_filter?</span>(<span class="ruby-identifier">payload</span>[<span class="ruby-identifier">:filter</span>])
-208: 
-209:       <span class="ruby-ivar">@validated</span> = <span class="ruby-keyword kw">true</span>
-210:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-      <div id="method-M000340" class="method-detail">
-        <a name="M000340"></a>
-
-        <div class="method-heading">
-          <a href="#M000340" class="method-signature">
-          <span class="method-name">validate_compound_filter</span><span class="method-args">(compound_filter)</span>
-          </a>
-        </div>
-      
-        <div class="method-description">
-          <p><a class="source-toggle" href="#"
-            onclick="toggleCode('M000340-source');return false;">[Source]</a></p>
-          <div class="method-source-code" id="M000340-source">
-<pre>
-     <span class="ruby-comment cmt"># File lib/mcollective/message.rb, line 151</span>
-151:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_compound_filter</span>(<span class="ruby-identifier">compound_filter</span>)
-152:       <span class="ruby-identifier">compound_filter</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">filter</span><span class="ruby-operator">|</span>
-153:         <span class="ruby-identifier">filter</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">statement</span><span class="ruby-operator">|</span>
-154:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">statement</span>[<span class="ruby-value str">&quot;fstatement&quot;</span>]
-155:             <span class="ruby-identifier">functionname</span> = <span class="ruby-identifier">statement</span>[<span class="ruby-value str">&quot;fstatement&quot;</span>][<span class="ruby-value str">&quot;name&quot;</span>]
-156:             <span class="ruby-identifier">pluginname</span> = <span class="ruby-constant">Data</span>.<span class="ruby-identifier">pluginname</span>(<span class="ruby-identifier">functionname</span>)
-157:             <span class="ruby-identifier">value</span> = <span class="ruby-identifier">statement</span>[<span class="ruby-value str">&quot;fstatement&quot;</span>][<span class="ruby-value str">&quot;value&quot;</span>]
-158: 
-159:             <span class="ruby-identifier">ddl</span> = <span class="ruby-constant">DDL</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pluginname</span>, <span class="ruby-identifier">:data</span>)
-160: 
-161:             <span class="ruby-comment cmt"># parses numbers and booleans entered as strings into proper</span>
-162:             <span class="ruby-comment cmt"># types of data so that DDL validation will pass</span>
-163:             <span class="ruby-identifier">statement</span>[<span class="ruby-value str">&quot;fstatement&quot;</span>][<span class="ruby-value str">&quot;params&quot;</span>] = <span class="ruby-constant">Data</span>.<span class="ruby-identifier">ddl_transform_input</span>(<span class="ruby-identifier">ddl</span>, <span class="ruby-identifier">statement</span>[<span class="ruby-value str">&quot;fstatement&quot;</span>][<span class="ruby-value str">&quot;params&quot;</span>])
-164: 
-165:             <span class="ruby-constant">Data</span>.<span class="ruby-identifier">ddl_validate</span>(<span class="ruby-identifier">ddl</span>, <span class="ruby-identifier">statement</span>[<span class="ruby-value str">&quot;fstatement&quot;</span>][<span class="ruby-value str">&quot;params&quot;</span>])
-166: 
-167:             <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">Data</span>.<span class="ruby-identifier">ddl_has_output?</span>(<span class="ruby-identifier">ddl</span>, <span class="ruby-identifier">value</span>)
-168:               <span class="ruby-constant">DDL</span>.<span class="ruby-identifier">validation_fail!</span>(<span class="ruby-identifier">:PLMC41</span>, <span class="ruby-value str">&quot;Data plugin '%{functionname}()' does not return a '%{value}' value&quot;</span>, <span class="ruby-identifier">:error</span>, {<span class="ruby-identifier">:functionname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">functionname</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">value</span>})
-169:             <span class="ruby-keyword kw">end</span>
-170:           <span class="ruby-keyword kw">end</span>
-171:         <span class="ruby-keyword kw">end</span>
-172:       <span class="ruby-keyword kw">end</span>
-173:     <span class="ruby-keyword kw">end</span>
-</pre>
-          </div>
-        </div>
-      </div>
-
-
-    </div>
-
-
-  </div>
-
-
-<div id="validator-badges">
-  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
-</div>
-
-</body>
-</html>
\ No newline at end of file