new Exchange(x, y, name, type, alternate)
Exchange class represents a component which receives messages and route them to queues.
Parameters:
Name | Type | Description |
---|---|---|
x | number | x position of the exchange |
y | number | y position of the exchange |
name | string | identifier |
type | string | exchange type |
alternate | Exchange | alternate exchange |
- Source
Extends
Methods
addToScene(scene) → {object}
Add an object as actor to scene.
Parameters:
Name | Type | Description |
---|---|---|
scene | Scene | scene on canvas |
- Inherited From
Returns:
this
- Type:
- object
createUUID() → {string}
Generates an UUID, used to identify every object in the scene.
https://www.w3resource.com/javascript-exercises/fundamental/javascript-fundamental-exercise-253.php
https://www.w3resource.com/javascript-exercises/fundamental/javascript-fundamental-exercise-253.php
- Inherited From
Returns:
- uuid
- Type:
- string
messageArrived(msg)
Handler for arriving messages.
Parameters:
Name | Type | Description |
---|---|---|
msg | ExchangeMessage |
- Source
removeBinding(binding)
Removes a binding from the exchange.
Parameters:
Name | Type | Description |
---|---|---|
binding | Binding | Binding object |
- Source
setAlternate(alternate)
Sets alternate exchange for exchange.
Parameters:
Name | Type | Description |
---|---|---|
alternate | Exchange | alternate exchange |
- Source