Frontend API
@Injectable() export class GraphMessageHandler
Handle the messages of the graph subprotocol from flow-based programming network protocol.
This protocol is utilized for communicating about graph changes in both directions.
This subprotocol description can be found here : https://flowbased.github.io/fbp-protocol/#graph-clear
Created by antoine on 15/06/2017.
handleMessage (msg: Object)
Redirect the given message to the proper handler method.
- Parameters:
msg
— the received graph message
private addNode (msg: Object)
Add a node on the graph. The node contains the received information.
https://flowbased.github.io/fbp-protocol/#graph-addnode
- Parameters:
msg
— the ‘graph:addnode’ message
private removeNode (msg: Object)
Remove the node with the received id from the graph.
https://flowbased.github.io/fbp-protocol/#graph-removenode
- Parameters:
msg
— the ‘graph:removenode’ message
private changeNode (msg: Object)
Change the node with the received id’s metadata, replacing them with the received metadata.
https://flowbased.github.io/fbp-protocol/#graph-changenode
- Parameters:
msg
— the ‘graph:changenode’ message
private addEdge (msg: Object)
Add an edge on the graph. The edge contains the received information.
https://flowbased.github.io/fbp-protocol/#graph-addedge
- Parameters:
msg
— the ‘graph:addedge’ message
private removeEdge (msg: Object)
Remove the edge with the received id from the graph.
https://flowbased.github.io/fbp-protocol/#graph-removeedge
- Parameters:
msg
— the ‘graph:removeedge’ message
private changeEdge (msg: Object)
Change the node with the received id’s metadata src and tgt, replacing them with the received ones.
https://flowbased.github.io/fbp-protocol/#graph-changeedge
- Parameters:
msg
— the ‘graph:changeedge’ message