Holds the configuration for one app-defined websocket data type: its connect, disconnect and message JavaScript handler functions, and whether it is restricted to admin domains. Instances are built by WebsocketMappingBuilder and looked up by ControllerMappingList to dispatch incoming websocket events through RepoAppWebsocketType.
Properties
| Property | Returns | Description |
|---|---|---|
| adminOnly | boolean | Whether sockets of this type may only be established on admin domains. |
| onConnectedFunction | Object | The JavaScript function called when a new socket of this type connects, or null if none was registered. |
| onDisconnectedFunction | Object | The JavaScript function called when a socket of this type disconnects, or null if none was registered. |
| onMessageFunction | Object | The JavaScript function called when a socket of this type receives a message from the client, or null if none was registered. |
| type | String | The data type this mapping was registered under, used to group and look up sockets of this kind. |
Methods
getType()
Returns: String
The data type this mapping was registered under, used to group and look up sockets of this kind.
getOnConnectedFunction()
Returns: Object
The JavaScript function called when a new socket of this type connects, or null if none was registered.
getOnDisconnectedFunction()
Returns: Object
The JavaScript function called when a socket of this type disconnects, or null if none was registered.
getOnMessageFunction()
Returns: Object
The JavaScript function called when a socket of this type receives a message from the client, or null if none was registered.
isAdminOnly()
Returns: boolean
Whether sockets of this type may only be established on admin domains.