ftpd.js
Version:
A FTP Server made in node.js
1,564 lines (356 loc) • 16.7 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Server</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Server</h1>
<section>
<header>
<h2>
Server
</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Server"><span class="type-signature"></span>new Server<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line14">line 14</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="close"><span class="type-signature"></span>close<span class="signature">(callback)</span><span class="type-signature"></span></h4>
<div class="description">
This method is used to close all of the interfaces the server is currently utilizing
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">Supervisor~finishClose</span>
</td>
<td class="description last">the callback to invoke upon completed closure of the interfaces</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line108">line 108</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getBaseMessage"><span class="type-signature"></span>getBaseMessage<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
This function is used to get the base logging message for the server
</div>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.o</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line239">line 239</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the base log message
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="getFtpdjs"><span class="type-signature"></span>getFtpdjs<span class="signature">()</span><span class="type-signature"> → {<a href="ftpdjs.html">ftpdjs</a>}</span></h4>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line179">line 179</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the ftpdjs instance using the server
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="ftpdjs.html">ftpdjs</a></span>
</dd>
</dl>
<h4 class="name" id="getID"><span class="type-signature"></span>getID<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
This function is used to get the id of the server
</div>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line191">line 191</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the id of the server
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="getInterfaceFile"><span class="type-signature"></span>getInterfaceFile<span class="signature">(name, callback, index)</span><span class="type-signature"></span></h4>
<div class="description">
This function is used to search for the wanted interface class in the interfaces paths provided by the server's
options
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">the name of the interface</td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="Server.html#~interfaceFile">Server~interfaceFile</a></span>
</td>
<td class="description last">the callback to invoke when finished looking for the class</td>
</tr>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last">the current path index. Use this if you want to ignore the paths defined before index</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line156">line 156</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getInterfaces"><span class="type-signature"></span>getInterfaces<span class="signature">()</span><span class="type-signature"> → {Array}</span></h4>
<div class="description">
This function is used to get the array of interfaces the server is utilizing
</div>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line215">line 215</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the initialized interfaces
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
<h4 class="name" id="getOptions"><span class="type-signature"></span>getOptions<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
<div class="description">
This function is used to get the server's options
</div>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line203">line 203</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the server's options
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="isSetup"><span class="type-signature"></span>isSetup<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
This function is used to tell wether or not all of the interfaces the server have to utilize have been setup
</div>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line227">line 227</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
wether or not all of the interfaces have been setup
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="setup"><span class="type-signature"></span>setup<span class="signature">(callback)</span><span class="type-signature"></span></h4>
<div class="description">
This function will be invoked by the application when the server instance have been successfully stored
in the application's main class. Use this to start and listen the interfaces needed.
Setup Process
- Setup User Manager
- Setup All Interfaces
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type"><a href="Server.html#~finishSetup">Server~finishSetup</a></span>
</td>
<td class="description last">the callback to invoke when finished</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line52">line 52</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Type Definitions</h3>
<h4 class="name" id="~finishClose"><span class="type-signature"></span>finishClose<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line94">line 94</a>
</li></ul></dd>
</dl>
<h4 class="name" id="~finishSetup"><span class="type-signature"></span>finishSetup<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
This callback will get invoked when the server have finished setting up all of the interfaces it wished to utilize
</div>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line31">line 31</a>
</li></ul></dd>
</dl>
<h4 class="name" id="~interfaceFile"><span class="type-signature"></span>interfaceFile<span class="signature">(interfacePath)</span><span class="type-signature"></span></h4>
<div class="description">
This callback will be invoked when the server finished looking for the wanted interface class
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>interfacePath</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">undefined</span>
</td>
<td class="description last">this will be the full path if the class was found otherwise it'll be
undefined</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>0.6.0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="server_index.js.html">server/index.js</a>, <a href="server_index.js.html#line137">line 137</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ftpdjs.html">ftpdjs</a></li><li><a href="Interface.html">Interface</a></li><li><a href="Server.html">Server</a></li><li><a href="User.html">User</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0-dev</a> on Wed May 27 2015 15:03:13 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>