DialogServiceConfig Class

Implements

java.lang.AutoCloseable

public class DialogServiceConfig
extends SpeechConfig
implements java.lang.AutoCloseable

Class that defines base configurations for dialog service connector. Note: close() must be called in order to release underlying resources held by the object.

Constructor Summary

Modifier Constructor Description
protected DialogServiceConfig(long handleValue)

Creates an instance of dialog service config.

Method Summary

Modifier and Type Method and Description
void close()

Dispose of associated resources.

SafeHandle getImpl()

Returns the dialog service configuration.

java.lang.String getLanguage()

Gets the language

java.lang.String getProperty(PropertyId id)

Gets the property by propertyId.

java.lang.String getProperty(String name)

Gets a named property as value.

void setLanguage(String value)

Sets the language

void setProperty(PropertyId id, String value)

Sets the property by propertyId.

void setProperty(String name, String value)

Sets a named property as value.

void setProxy(String proxyHostName, int proxyPort, String proxyUserName, String proxyPassword)

Sets proxy configuration Note: Proxy functionality is not available on macOS.

void setServiceProperty(String name, String value, ServicePropertyChannel channel)

Sets a property value that will be passed to service using the specified channel.

Methods inherited from SpeechConfig

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

DialogServiceConfig

protected DialogServiceConfig(long handleValue)

Creates an instance of dialog service config.

Parameters:

handleValue - The native handle

Method Details

close

public void close()

Dispose of associated resources.

Overrides:

DialogServiceConfig.close()

getImpl

public SafeHandle getImpl()

Returns the dialog service configuration.

Overrides:

DialogServiceConfig.getImpl()

Returns:

The implementation of the config.

getLanguage

public String getLanguage()

Gets the language

Returns:

Returns the language.

getProperty

public String getProperty(PropertyId id)

Gets the property by propertyId.

Overrides:

DialogServiceConfig.getProperty(PropertyId id)

Parameters:

id - PropertyId of the property.

Returns:

The value.

getProperty

public String getProperty(String name)

Gets a named property as value.

Overrides:

DialogServiceConfig.getProperty(String name)

Parameters:

name - the name of the property.

Returns:

The value.

setLanguage

public void setLanguage(String value)

Sets the language

Parameters:

value - the language identifier in BCP-47 format.

setProperty

public void setProperty(PropertyId id, String value)

Sets the property by propertyId.

Overrides:

DialogServiceConfig.setProperty(PropertyId id, String value)

Parameters:

id - PropertyId of the property.
value - The value.

setProperty

public void setProperty(String name, String value)

Sets a named property as value.

Overrides:

DialogServiceConfig.setProperty(String name, String value)

Parameters:

name - the name of the property.
value - the value.

setProxy

public void setProxy(String proxyHostName, int proxyPort, String proxyUserName, String proxyPassword)

Sets proxy configuration Note: Proxy functionality is not available on macOS. This function will have no effect on this platform.

Overrides:

DialogServiceConfig.setProxy(String proxyHostName, int proxyPort, String proxyUserName, String proxyPassword)

Parameters:

proxyHostName - the host name of the proxy server, without the protocol scheme (http://)
proxyPort - the port number of the proxy server.
proxyUserName - the user name of the proxy server. Use empty string if no user name is needed.
proxyPassword - the password of the proxy server. Use empty string if no user password is needed.

setServiceProperty

public void setServiceProperty(String name, String value, ServicePropertyChannel channel)

Sets a property value that will be passed to service using the specified channel.

Overrides:

DialogServiceConfig.setServiceProperty(String name, String value, ServicePropertyChannel channel)

Parameters:

name - the property name.
value - the property value.
channel - the channel used to pass the specified property to service.

Applies to