ILXServer¶
new ILXServer([array], [options])
- Since:
- BIP-IP TMOS 12.1
Parameters:
Name | Type | Attributes | Description | ||
---|---|---|---|---|---|
array
|
object | <optional> | Array of objects of for each method in {<name>': <c
allback_functio n>} format |
||
options
|
object | <optional> | server options Pro
rties +—+—+—+– -+—+ | N | T | A | D
a | y | t | e
| e |
m | p | t | f
| s |
e | e | r | a
| c |
| | i | u
| r |
| | b | l
| i |
| | u | t
| p |
| | t |
| t |
| | e |
| i |
| | s |
| o |
| | |
| n |
+===+===+===+== =+===+ | : | b | < | f
: | o | o | a
| e |
| o | p | l
| b |
| l | t | s
| u |
| e | i | e
| g |
| a | o |
| l |
d | n | n |
| o |
e | | a |
| g |
b | | l |
| g |
u | | > |
| i |
g | | |
| n |
| | |
| g |
+—+—+—+– -+—+ | : | i | < | 5
: | n | o | 0
| C |
| t | p | 0
| P |
| e | t | 0
| s |
| g | i |
| o |
| e | o |
| c |
t | r | n |
| k |
i | | a |
| e |
m | | l |
| t |
e | | > |
| t |
o | | |
| i |
u | | |
| m |
t | | |
| e |
| | |
| o |
| | |
| u |
| | |
| t |
| | |
| i |
| | |
| n |
| | |
| m |
| | |
| i |
| | |
| l |
| | |
| l |
| | |
| i |
| | |
| s |
| | |
| e |
| | |
| c |
| | |
| o |
| | |
| n |
| | |
| d |
| | |
| s |
+—+—+—+– -+—+ |
Example:
var f5 = require('f5-nodejs');
var ilx = new f5.ILXServer();
ilx.addMethod('<method_name>', function(req, res) {
var arg = req.params()[0];
<Your Node.js code here>
res.reply('<RESPONSE>');
});
ilx.listen();
Methods¶
addMethod(name, callback)¶
Parameters:¶
Name | Type | Description |
---|---|---|
name
|
string | method name |
callback
|
ILXServer~methodCall back | that handles the request |
listen()¶
removeMethod(name)¶
Parameters:¶
Name | Type | Description |
---|---|---|
name
|
string | method name |
setDefaultMethod(callback)¶
Parameters:¶
Name | Type | Description |
---|---|---|
callback
|
ILXServer~methodCall back | callback that handles the request |
Type Definitions¶
methodCallback(request, response)¶
Parameters:¶
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
request
|
object | request object Propertie
1
|
||||||||
response
|
object | response object (not available for notifications) Propertie
2
|
Example:¶
ilx.addMethod('<method_name>', function(req, res) {
// Function parameters can be found in req.params().
var arg1 = req.params()[0];
var arg2 = req.params()[1];
res.reply('<RESPONSE>'); // Returns as single string arg
res.reply(['<result1>', '<result2>']); // Returns as TCL list
});
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.