Class MessagingStub
Messaging Stub Class
Defined in: MessagingStub.js.
Constructor Attributes | Constructor Name and Description |
---|---|
******************************************************************************
|
Method Attributes | Method Name and Description |
---|---|
addListener(StubEvtHandler, URI, contextId)
Adds a listener.
|
|
connect(ownRtcIdentity, credentials, callbackFunction)
Connect
|
|
Disconnects from the server.
|
|
Gets the list of listeners.
|
|
removeListener(StubEvtHandler, URI, contextId)
Removes a listener.
|
|
SendMessage
|
Class Detail
MessagingStub()
******************************************************************************
Method Detail
addListener(StubEvtHandler, URI, contextId)
Adds a listener. If the listener exists with the same contextID, doesn't add it again.
- Parameters:
- StubEvtHandler
- : listener ... listener to execute its do(message) when a new message arrives.
- URI
- : contextId ... the ID of the context to be notified.
- contextId
connect(ownRtcIdentity, credentials, callbackFunction)
Connect
- Parameters:
- ownRtcIdentity
- credentials
- callbackFunction
disconnect()
Disconnects from the server.
getListeners()
Gets the list of listeners.
- Returns:
- [listener[], contextID[]] Returns an 2-D array of listeners and contextIDs
removeListener(StubEvtHandler, URI, contextId)
Removes a listener.
- Parameters:
- StubEvtHandler
- : listener ... listener to execute its do(message) when a new message arrives.
- URI
- : contextId ... the ID of the context to be notified.
- contextId
sendMessage()
SendMessage
- Parameters:
- message...
- Message