-
<static> applyLogger()
-
Add a custom logger for the Server core to use for logging
- Source:
-
-
<static> callWorker(wName, msg)
-
Send message to worker thread.
Parameters:
Name |
Type |
Description |
wName |
String
|
Worker's name to call. |
msg |
Object
|
Message object. |
- Source:
-
-
<static> createWorker(wName, wFile)
-
Creates and instantiates a worker thread.
Parameters:
Name |
Type |
Description |
wName |
String
|
Worker name. |
wFile |
String
|
JS file to feed to worker thread. |
- Source:
-
-
<static> getSvcUrl(svcName)
-
Get the url path of given web service..
Parameters:
Name |
Type |
Description |
svcName |
String
|
Service name. |
- Source:
-
-
<static> killWorker(wName)
-
Kill/Terminate/Close worker service.
Parameters:
Name |
Type |
Description |
wName |
String
|
Worker name. |
- Source:
-
-
<static> parseWorkerMsg(msg)
-
Parse worker messages.
Parameters:
Name |
Type |
Description |
msg |
Object
|
Communication message
Properties
Name |
Type |
Description |
data |
Object
|
Message data.
Properties
Name |
Type |
Description |
svc_name |
String
|
Caller service name. |
worker_name |
String
|
Caller worker name. |
svc_path |
String
|
Caller service path (url). |
svc_frame |
function
|
Caller service frame. |
|
|
- Source:
-
-
<static> registerService(svcName, frame, path, wName)
-
Register a Web Service.
Parameters:
Name |
Type |
Description |
svcName |
string
|
The name of the web service |
frame |
Object
|
Hop Web service frame. |
path |
string
|
The Web Service relative url path
e.g. /face_detection/detect_faces |
wName |
string
|
The name of the worker to register this web service |
- Source:
-
-
<static> registerWorker(worker)
-
Register worker service.
A worker can handle multiple services;
Parameters:
Name |
Type |
Description |
worker |
Object
|
Service information.
Properties
Name |
Type |
Description |
file |
String
|
Path to worker file. |
name |
String
|
Service name. |
|
- Source:
-
-
<static> serviceExists(svcName)
-
Returns true if a service has been registered.
Parameters:
Name |
Type |
Description |
svcName |
String
|
Service name. |
- Source:
-
-
<static> serviceUrl(path)
-
Create web service full url path by given service path.
Parameters:
Name |
Type |
Description |
path |
String
|
Service's path (e.g. /hop/face_detection). |
- Source:
-
-
<static> setSvcUrl(svcName)
-
Set the url path of given web service..
Parameters:
Name |
Type |
Description |
svcName |
String
|
Service name. |
- Source:
-
-
<static> workerExists(wName)
-
Returns true if a worker has been registered.
Parameters:
Name |
Type |
Description |
wName |
String
|
Worker name. |
- Source:
-