new Server()
- Since:
- 0.6.0
- Source:
Methods
close(callback)
This method is used to close all of the interfaces the server is currently utilizing
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
Supervisor~finishClose | the callback to invoke upon completed closure of the interfaces |
- Since:
- 0.6.0
- Source:
getBaseMessage() → {string}
This function is used to get the base logging message for the server
- Since:
- 0.6.o
- Source:
Returns:
the base log message
- Type
- string
getFtpdjs() → {ftpdjs}
- Since:
- 0.6.0
- Source:
Returns:
the ftpdjs instance using the server
- Type
- ftpdjs
getID() → {string}
This function is used to get the id of the server
- Since:
- 0.6.0
- Source:
Returns:
the id of the server
- Type
- string
getInterfaceFile(name, callback, index)
This function is used to search for the wanted interface class in the interfaces paths provided by the server's
options
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | the name of the interface |
callback |
Server~interfaceFile | the callback to invoke when finished looking for the class |
index |
int | the current path index. Use this if you want to ignore the paths defined before index |
- Source:
getInterfaces() → {Array}
This function is used to get the array of interfaces the server is utilizing
- Since:
- 0.6.0
- Source:
Returns:
the initialized interfaces
- Type
- Array
getOptions() → {Object}
This function is used to get the server's options
- Since:
- 0.6.0
- Source:
Returns:
the server's options
- Type
- Object
isSetup() → {boolean}
This function is used to tell wether or not all of the interfaces the server have to utilize have been setup
- Since:
- 0.6.0
- Source:
Returns:
wether or not all of the interfaces have been setup
- Type
- boolean
setup(callback)
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
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
Server~finishSetup | the callback to invoke when finished |
- Since:
- 0.6.0
- Source:
Type Definitions
finishClose()
- Since:
- 0.6.0
- Source:
finishSetup()
This callback will get invoked when the server have finished setting up all of the interfaces it wished to utilize
- Since:
- 0.6.0
- Source:
interfaceFile(interfacePath)
This callback will be invoked when the server finished looking for the wanted interface class
Parameters:
| Name | Type | Description |
|---|---|---|
interfacePath |
string | undefined | this will be the full path if the class was found otherwise it'll be undefined |
- Since:
- 0.6.0
- Source: