ChannelObject
gives a new anonymous channel specification.
ChannelObject["mqtts://…"]
represents a channel specified by a given URL.
ChannelObject["relpath"]
represents a channel for the currently authenticated user at a relative path.
ChannelObject["id:path"]
represents a channel for the user with the specified Wolfram ID at the given path.
ChannelObject["/abspath"]
represents a channel at an absolute path on the channel broker.
Details and Options
- ChannelObject does not create a channel but merely provides an object that can be used to refer to a channel. CreateChannel actually creates channels.
- New channel objects that are not specified with a full URL are created with reference to the channel broker specified by $ChannelBase.
- ChannelObject[CloudObject[…]] returns the associated channel object of a cloud object that represents a deployed ChannelReceiverFunction.
- ChannelObject allows the following options:
-
ChannelBase $ChannelBase default base URI for new channel specifications ChannelBrokerAction None action to execute on the channel broker server in addition to routing a message MetaInformation {} association or rules giving metainformation Permissions "Private" permissions for access etc. - Options[ChannelObject[…],…] gives the current options of a previously created ChannelObject. SetOptions can be used to change them.
- Information of a ChannelObject expression can include the following properties:
-
"ChannelBase" base URL of channel broker server for the channel "Path" path of the channel on the channel broker server "Permissions" access permissions of the channel "MetaInformation" MetaInformation option of the channel
Examples
open allclose allScope (8)
A channel in the home area of the currently authenticated user:
A named channel in a subdirectory of the home area:
A named channel of another user:
A channel referred to by the absolute path on the channel broker server:
A channel referred to by the URL:
A channel associated with a cloud object deployed for a channel receiver:
Delete the channel that was automatically created by CloudDeploy:
Options (2)
Permissions (2)
Start listening on the channel and send some data:
Other users can send data to your channel by referring to your $WolframID:
A channel to which you can listen and everyone can send messages:
Properties & Relations (4)
ChannelObject creates a reference to the channel without creating a channel on the server:
Check that the channel does not exist:
Create a channel and verify that it exists on the server:
Delete the channel from the server:
CreateChannel returns a ChannelObject:
ChannelObject is used by ChannelListen, ChannelSend, and other functions:
ChannelObject can be retrieved from the ChannelListener object:
Text
Wolfram Research (2016), ChannelObject, Wolfram Language function, https://reference.wolfram.com/language/ref/ChannelObject.html (updated 2017).
CMS
Wolfram Language. 2016. "ChannelObject." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/ChannelObject.html.
APA
Wolfram Language. (2016). ChannelObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ChannelObject.html