ConnectionMessage Class
- java.
lang. Object - com.
microsoft. cognitiveservices. speech. ConnectionMessage
- com.
Implements
public final class ConnectionMessage
implements java.lang.AutoCloseable
ConnectionMessage represents implementation specific messages sent to and received from the speech service. These messages are provided for debugging purposes and should not be used for production use cases with the Azure Cognitive Services Speech Service. Messages sent to and received from the Speech Service are subject to change without notice. This includes message contents, headers, payloads, ordering, etc. Note: close() must be called in order to release underlying resources held by the object. Added in version 1.15.0.
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
close()
Explicitly frees any external resource attached to the object. |
byte[] |
getBinaryMessage()
Gets the binary message payload. |
java.lang.String |
getPath()
The message Path |
Property |
getProperties()
A collection of properties and their values defined for this Connection |
java.lang.String |
getTextMessage()
Gets the text message payload. |
boolean |
isBinaryMessage()
Checks to see if the Connection |
boolean |
isTextMessage()
Checks to see if the Connection |
java.lang.String |
toString()
Returns a string that represents the connection message. |
Methods inherited from java.lang.Object
Method Details
close
public void close()
Explicitly frees any external resource attached to the object. Note: close() must be called in order to release underlying resources held by the object.
getBinaryMessage
public byte[] getBinaryMessage()
Gets the binary message payload.
Returns:
getPath
public String getPath()
The message Path
Returns:
getProperties
public PropertyCollection getProperties()
A collection of properties and their values defined for this ConnectionMessage. Message headers can be accessed via this collection (e.g. "Content-Type").
Returns:
getTextMessage
public String getTextMessage()
Gets the text message payload. Typically the text message content-type is application/json. To determine other content-types use Properties.GetProperty("Content-Type").
Returns:
isBinaryMessage
public boolean isBinaryMessage()
Checks to see if the ConnectionMessage is a binary message. See also GetBinaryMessage().
Returns:
isTextMessage
public boolean isTextMessage()
Checks to see if the ConnectionMessage is a text message. See also IsBinaryMessage().
Returns:
toString
public String toString()
Returns a string that represents the connection message.
Overrides:
ConnectionMessage.toString()Returns:
Applies to
Azure SDK for Java