1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-25 10:50:00 -05:00
vsphere-automation-sdk-python/vsphere/6.0/vmware.vapi.protocol.server.html
2018-08-07 16:42:25 -07:00

294 lines
18 KiB
HTML

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>server Package &mdash; vCloud Suite SDK for Python 6.0.0 documentation</title>
<link rel="stylesheet" href="_static/vapitheme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '6.0.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="vCloud Suite SDK for Python 6.0.0 documentation" href="index.html" />
<link rel="up" title="protocol Package" href="vmware.vapi.protocol.html" />
<link rel="next" title="msg Package" href="vmware.vapi.protocol.server.msg.html" />
<link rel="prev" title="transport Package" href="vmware.vapi.protocol.common.transport.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="vmware.vapi.protocol.server.msg.html" title="msg Package"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="vmware.vapi.protocol.common.transport.html" title="transport Package"
accesskey="P">previous</a> |</li>
<li><a href="index.html">vCloud Suite SDK for Python 6.0.0 documentation</a> &raquo;</li>
<li><a href="vmware.html" >vmware Package</a> &raquo;</li>
<li><a href="vmware.vapi.html" >vapi Package</a> &raquo;</li>
<li><a href="vmware.vapi.protocol.html" accesskey="U">protocol Package</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="server-package">
<h1>server Package<a class="headerlink" href="#server-package" title="Permalink to this headline"></a></h1>
<div class="section" id="id1">
<h2><tt class="xref py py-mod docutils literal"><span class="pre">server</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<span class="target" id="module-vmware.vapi.protocol.server"></span></div>
<div class="section" id="module-vmware.vapi.protocol.server.api_handler">
<span id="api-handler-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">api_handler</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.protocol.server.api_handler" title="Permalink to this headline"></a></h2>
<p>Api handler interface</p>
<dl class="class">
<dt id="vmware.vapi.protocol.server.api_handler.ApiHandler">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.server.api_handler.</tt><tt class="descname">ApiHandler</tt><a class="reference internal" href="_modules/vmware/vapi/protocol/server/api_handler.html#ApiHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.ApiHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Generic api handler interface</p>
<p>Generic api handler interface init</p>
<dl class="method">
<dt id="vmware.vapi.protocol.server.api_handler.ApiHandler.handle_request">
<tt class="descname">handle_request</tt><big>(</big><em>request</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/server/api_handler.html#ApiHandler.handle_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.ApiHandler.handle_request" title="Permalink to this definition"></a></dt>
<dd><p>handle request</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type :</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-even field"><th class="field-name">Param :</th><td class="field-body">request string</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">response string</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="vmware.vapi.protocol.server.api_handler.AsyncApiHandler">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.server.api_handler.</tt><tt class="descname">AsyncApiHandler</tt><a class="reference internal" href="_modules/vmware/vapi/protocol/server/api_handler.html#AsyncApiHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#vmware.vapi.protocol.server.api_handler.ApiHandler" title="vmware.vapi.protocol.server.api_handler.ApiHandler"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.server.api_handler.ApiHandler</span></tt></a></p>
<p>Callback based AsyncApiHandler</p>
<p>Callback based AsyncApiHandler init</p>
<dl class="attribute">
<dt id="vmware.vapi.protocol.server.api_handler.AsyncApiHandler.CANCELLED">
<tt class="descname">CANCELLED</tt><em class="property"> = 8</em><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler.CANCELLED" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.protocol.server.api_handler.AsyncApiHandler.END_STATES">
<tt class="descname">END_STATES</tt><em class="property"> = (1, 2, 8)</em><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler.END_STATES" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.protocol.server.api_handler.AsyncApiHandler.ERROR">
<tt class="descname">ERROR</tt><em class="property"> = 2</em><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler.ERROR" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.protocol.server.api_handler.AsyncApiHandler.PENDING">
<tt class="descname">PENDING</tt><em class="property"> = 4</em><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler.PENDING" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.protocol.server.api_handler.AsyncApiHandler.SUCCESS">
<tt class="descname">SUCCESS</tt><em class="property"> = 1</em><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler.SUCCESS" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.protocol.server.api_handler.AsyncApiHandler.VALID_STATES">
<tt class="descname">VALID_STATES</tt><em class="property"> = (1, 2, 4, 8)</em><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler.VALID_STATES" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.server.api_handler.AsyncApiHandler.async_handle_request">
<tt class="descname">async_handle_request</tt><big>(</big><em>request</em>, <em>state_change_cb=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/server/api_handler.html#AsyncApiHandler.async_handle_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler.async_handle_request" title="Permalink to this definition"></a></dt>
<dd><p>async handle request</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>request</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; request string</li>
<li><strong>state_change_cb</strong> (<em>function</em>) &#8211; <p>state change callback
def state_change_cb(state, # One of the valid state</p>
<blockquote>
<div><blockquote>
<div>response) # Response value associated with state</div></blockquote>
<p># SUCCESS: response is the request response msg
# ERROR: response is the exception thrown (or error response msg?)
# PENDING: response is the progress (0 - 100)
# CANCELLED: None</p>
</div></blockquote>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.protocol.server.async_api_handler_adapter">
<span id="async-api-handler-adapter-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">async_api_handler_adapter</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.protocol.server.async_api_handler_adapter" title="Permalink to this headline"></a></h2>
<p>Async api handler adapter</p>
<dl class="class">
<dt id="vmware.vapi.protocol.server.async_api_handler_adapter.PooledAsyncApiHandlerAdapter">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.server.async_api_handler_adapter.</tt><tt class="descname">PooledAsyncApiHandlerAdapter</tt><big>(</big><em>api_handler</em>, <em>workers_pool</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/server/async_api_handler_adapter.html#PooledAsyncApiHandlerAdapter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.server.async_api_handler_adapter.PooledAsyncApiHandlerAdapter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#vmware.vapi.protocol.server.api_handler.AsyncApiHandler" title="vmware.vapi.protocol.server.api_handler.AsyncApiHandler"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.server.api_handler.AsyncApiHandler</span></tt></a></p>
<p>Pooled async api handler adapter</p>
<p>Pooled async api handler adapter init</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>api_handler</strong> (<a class="reference internal" href="#vmware.vapi.protocol.server.api_handler.ApiHandler" title="vmware.vapi.protocol.server.api_handler.ApiHandler"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.server.api_handler.ApiHandler</span></tt></a>) &#8211; api handler</li>
<li><strong>workers_pool</strong> (<tt class="xref py py-class docutils literal"><span class="pre">object</span></tt> with function &#8216;queue_work&#8217;.
e.g. <a class="reference internal" href="vmware.vapi.lib.html#vmware.vapi.lib.thread_pool.ThreadPool" title="vmware.vapi.lib.thread_pool.ThreadPool"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.lib.thread_pool.ThreadPool</span></tt></a>) &#8211; worker pool object</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.protocol.server.async_api_handler_adapter.PooledAsyncApiHandlerAdapter.async_handle_request">
<tt class="descname">async_handle_request</tt><big>(</big><em>request</em>, <em>state_change_cb=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/server/async_api_handler_adapter.html#PooledAsyncApiHandlerAdapter.async_handle_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.server.async_api_handler_adapter.PooledAsyncApiHandlerAdapter.async_handle_request" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.server.async_api_handler_adapter.PooledAsyncApiHandlerAdapter.handle_request">
<tt class="descname">handle_request</tt><big>(</big><em>request</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/server/async_api_handler_adapter.html#PooledAsyncApiHandlerAdapter.handle_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.server.async_api_handler_adapter.PooledAsyncApiHandlerAdapter.handle_request" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="vmware.vapi.protocol.server.msg.html">msg Package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="vmware.vapi.protocol.server.msg.html#id1"><tt class="docutils literal"><span class="pre">msg</span></tt> Package</a></li>
<li class="toctree-l2"><a class="reference internal" href="vmware.vapi.protocol.server.msg.html#module-vmware.vapi.protocol.server.msg.handler_factory"><tt class="docutils literal"><span class="pre">handler_factory</span></tt> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="vmware.vapi.protocol.server.msg.html#module-vmware.vapi.protocol.server.msg.json_handler"><tt class="docutils literal"><span class="pre">json_handler</span></tt> Module</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="vmware.vapi.protocol.server.transport.html">transport Package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="vmware.vapi.protocol.server.transport.html#id1"><tt class="docutils literal"><span class="pre">transport</span></tt> Package</a></li>
<li class="toctree-l2"><a class="reference internal" href="vmware.vapi.protocol.server.transport.html#module-vmware.vapi.protocol.server.transport.async_protocol_handler"><tt class="docutils literal"><span class="pre">async_protocol_handler</span></tt> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="vmware.vapi.protocol.server.transport.html#module-vmware.vapi.protocol.server.transport.async_server_adapter_factory"><tt class="docutils literal"><span class="pre">async_server_adapter_factory</span></tt> Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="vmware.vapi.protocol.server.transport.html#module-vmware.vapi.protocol.server.transport.msg_handler"><tt class="docutils literal"><span class="pre">msg_handler</span></tt> Module</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">server Package</a><ul>
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">server</span></tt> Package</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.protocol.server.api_handler"><tt class="docutils literal"><span class="pre">api_handler</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.protocol.server.async_api_handler_adapter"><tt class="docutils literal"><span class="pre">async_api_handler_adapter</span></tt> Module</a></li>
<li><a class="reference internal" href="#subpackages">Subpackages</a><ul>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="vmware.vapi.protocol.common.transport.html"
title="previous chapter">transport Package</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="vmware.vapi.protocol.server.msg.html"
title="next chapter">msg Package</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/vmware.vapi.protocol.server.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="vmware.vapi.protocol.server.msg.html" title="msg Package"
>next</a> |</li>
<li class="right" >
<a href="vmware.vapi.protocol.common.transport.html" title="transport Package"
>previous</a> |</li>
<li><a href="index.html">vCloud Suite SDK for Python 6.0.0 documentation</a> &raquo;</li>
<li><a href="vmware.html" >vmware Package</a> &raquo;</li>
<li><a href="vmware.vapi.html" >vapi Package</a> &raquo;</li>
<li><a href="vmware.vapi.protocol.html" >protocol Package</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2014, VMware, Inc..
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>