Class sap.ui.core.ws.SapPcpWebSocketModule: sap/ui/core/ws/SapPcpWebSocket
extends WebSocket
WebSocket class implementing the pcp-protocol
Namespaces & Classes
SUPPORTED_PROTOCOLSProtocol versions.
Constructor Summary
new sap.ui.core.ws.SapPcpWebSocket(sUrl, aProtocols?)Creates a new WebSocket connection and uses the pcp-protocol for communication.
Event Summary
Events borrowed from class sap.ui.core.ws.WebSocket
Method Summary
sap.ui.core.ws.SapPcpWebSocket.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.ws.SapPcpWebSocket with name 
sClassName and enriches it with the information contained in oClassInfo.sap.ui.core.ws.SapPcpWebSocket.getMetadata()Returns a metadata object for class sap.ui.core.ws.SapPcpWebSocket.
Methods borrowed from class sap.ui.core.ws.WebSocket
Methods borrowed from class sap.ui.base.EventProvider
Methods borrowed from class sap.ui.base.Object
 Constructor Detail 
 new sap.ui.core.ws.SapPcpWebSocket(sUrl, aProtocols?) 
 Creates a new WebSocket connection and uses the pcp-protocol for communication. 
Parameters:
| {string} | sUrl | relative or absolute URL for WebSocket connection. | 
| {array} | aProtocols? | array of protocols as strings, a single protocol as a string. Protocol(s) should be selected from sap.ui.core.ws.SapPcpWebSocket.SUPPORTED_PROTOCOLS. | 
 Event Detail 
 message(oControlEvent)
 The 'message' event is fired, when a message was received. 
Parameters:
| {sap.ui.base.Event} | oControlEvent | |
| {sap.ui.base.EventProvider} | oControlEvent.getSource | |
| {object} | oControlEvent.getParameters | |
| {string} | oControlEvent.getParameters.data | Received data from the server. | 
| {string} | oControlEvent.getParameters.pcpFields | Received pcpFields as a key-value map. | 
 Method Detail 
 sap.ui.core.ws.SapPcpWebSocket.extend(sClassName, oClassInfo?, FNMetaImpl?): function
 Creates a new subclass of class sap.ui.core.ws.SapPcpWebSocket with name 
sClassName and enriches it with the information contained in oClassInfo. oClassInfo might contain the same kind of information as described in sap.ui.core.ws.WebSocket.extend. 
Parameters:
| {string} | sClassName | Name of the class being created | 
| {object} | oClassInfo? | Object literal with information about the class | 
| {function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata | 
Returns:
| {function} | Created class / constructor function | 
 sap.ui.core.ws.SapPcpWebSocket.getMetadata(): sap.ui.base.Metadata
 Returns a metadata object for class sap.ui.core.ws.SapPcpWebSocket. 
Returns:
| {sap.ui.base.Metadata} | Metadata object describing this class | 
 fireMessage(mArguments?): sap.ui.core.ws.SapPcpWebSocket
 Fire event 'message' to attached listeners. 
Parameters:
| {object} | mArguments? | the arguments to pass along with the event. | 
| {string} | mArguments.data? | Received data from the server. | 
| {string} | mArguments.pcpFields? | Received pcpFields as a key-value map. | 
Returns:
| {sap.ui.core.ws.SapPcpWebSocket} | thisto allow method chaining | 
 send(message, oPcpFields?): sap.ui.core.ws.SapPcpWebSocket
 Sends a message and optional pcp-header-fields using the pcp-protocol.
If the connection is not yet opened, the message will be queued and sent when the connection is established.
If the connection is not yet opened, the message will be queued and sent when the connection is established.
Parameters:
| {string|blob|arraybuffer} | message | message to send | 
| {object} | oPcpFields? | additional pcp-fields as key-value map | 
Returns:
| {sap.ui.core.ws.SapPcpWebSocket} | thisto allow method chaining |