Constructor
new CentralSuper(name, handler)
- Description:
Constructor
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | A parameter name used to uniquely identify a message for this Central |
handler |
function | function to process incoming messages return value of this function is sent back to the worker as a reply |
Methods
fromMe(data, date, reply, error) → {Object}
- Description:
Create a message out of supplied params
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Any | data to send |
date |
Long | date of the message |
reply |
Boolean | whether this message is a reply |
error |
String | if any |
Returns:
message object
- Type
- Object
isForMe(m) → {Boolean}
- Description:
Returns whether the message is for this channel instance
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
m |
Object | message |
Returns:
true if for this channel
- Type
- Boolean