public interface ChannelDriverPU
Digital Messaging Server processing unit (PU) interface for media channel driver.
This processing unit is a Digital Messaging Server's component, which provides services to channel driver.
Copyright (C) 2008-2017 Genesys Telecommunications Laboratories Inc.
All rights reserved.
Modifier and Type | Method and Description |
---|---|
void |
changeConfiguration(com.genesyslab.platform.commons.collections.KeyValueCollection kvcOptionsUpdate,
com.genesyslab.platform.commons.collections.KeyValueCollection kvcOptionsDelete)
Request to change channel driver's configuration.
|
void |
connectionState(boolean connected,
String stateInfo)
Inform SM Server about a new connection state of a media source.
|
com.genesyslab.mcr.smserver.channel.ChannelConnectors.ChannelConnector |
getChannelConnector()
Get a channel connector.
|
String |
getChannelName()
Get media channel's name (configuration options section name).
|
String |
getChatDescription(com.genesyslab.platform.commons.collections.KeyValueCollection messageData)
Get chat session description.
|
com.genesyslab.mcr.smserver.gframework.GfrPU |
getGfrPU()
Get SM Server GfrPU object.
|
int |
getNextItxReferenceId()
Get next reference ID to form a request to Interaction Server.
|
String |
getPrimaryServerName()
Get SM Server's primary server's name (configuration application name).
|
String |
getServerName()
Get SM Server's name (configuration application name).
|
String[] |
getServerVersions()
Get DM Server's versions.
|
String |
getWorkspaceLocation()
Get SM Server's workspace location in a form of a local path or a network path.
|
Path |
getWorkspacePath()
Get SM Server's workspace path.
|
Boolean |
isPrimaryExecutionMode()
Ask SM Server about its current execution mode.
|
boolean |
isUcsConnected()
Ask SM Server if connection with UCS is established.
|
com.genesyslab.platform.commons.protocol.Message |
sendItxRequestAndWait(com.genesyslab.platform.commons.protocol.Message itxRequestMessage,
long timeout)
Ask SM Server to send a request to Interaction Server.
|
Genesys.mcr.esp.ESPResponse |
sendUcsRequestAndWait(String service,
String method,
com.genesyslab.platform.commons.collections.KeyValueCollection parameters,
com.genesyslab.platform.commons.collections.KeyValueCollection userdata,
long timeout)
Ask SM Server to send a request to Contact Server.
|
void |
submitMessage(String requestId,
com.genesyslab.platform.commons.collections.KeyValueCollection messageData)
Ask SM Server to submit an interaction with a message to Interaction Server.
|
boolean |
umsFaultResponse(String requestId,
int errorCode,
String errorMessage,
com.genesyslab.platform.commons.collections.KeyValueCollection responseData)
Inform SM Server about a fault of an ESP request processing.
|
boolean |
umsResponse(String requestId,
com.genesyslab.platform.commons.collections.KeyValueCollection responseData)
Inform SM Server about a success of an ESP request processing.
|
String[] getServerVersions()
String getServerName()
String getPrimaryServerName()
String getChannelName()
Path getWorkspacePath()
SM Server's workspace is a dedicated folder in a file system, which can be used by a channel driver to store its data. The folder has create/write/read access rights. It may be located somewhere in a network file system, e.g. its value may be "c:\sms-workspace\" or "\\remote-box\shared-folder\"
String getWorkspaceLocation()
SM Server's workspace is a dedicated folder in a file system, which can be used by a channel driver to store its data. The folder has create/write/read access rights. It may be located somewhere in a network file system, e.g. its value may be "c:\sms-workspace\" or "\\remote-box\shared-folder\"
com.genesyslab.mcr.smserver.channel.ChannelConnectors.ChannelConnector getChannelConnector()
Channel connector is a SM Server's component, which contains a description of a media channel and provides an access to a channel's data required to a channel driver.
com.genesyslab.mcr.smserver.gframework.GfrPU getGfrPU()
GfrPU object is a SM Server's component, which provides miscellaneous services to a channel driver (logging, access to option's value).
void connectionState(boolean connected, String stateInfo)
connected
- connection state: true - a connection with media source is established, false - no connection
establishedstateInfo
- informational message about the connection state - any text description of the connection stateBoolean isPrimaryExecutionMode()
void changeConfiguration(com.genesyslab.platform.commons.collections.KeyValueCollection kvcOptionsUpdate, com.genesyslab.platform.commons.collections.KeyValueCollection kvcOptionsDelete) throws Exception
Each parameter contains a set of list objects, which should be updated or deleted. Any parameter may be empty. List objects are named with respective configurataion's sections names. List objects from parameter kvcOptionsUpdate contains kv-pairs, where key is an option name and value is an option value. List objects from parameter kvcOptionsDelete may be empty, if a whole configuration section should be deleted, or may contain kv-pairs, where key is an option name to be deleted and value is an empty string.
kvcOptionsUpdate
- configuration options sections in the server application object to be added or changedkvcOptionsDelete
- configuration options sections and options in the server application object, which should be deletedException
boolean umsResponse(String requestId, com.genesyslab.platform.commons.collections.KeyValueCollection responseData)
requestId
- request Id, which has been returned by method
umsRequest
responseData
- results of the request processing in a channel driver. The request is referred by parameter requestId.
Key-value pairs from this parameter will be returned as ESP parameters to the ESP request's caller.boolean umsFaultResponse(String requestId, int errorCode, String errorMessage, com.genesyslab.platform.commons.collections.KeyValueCollection responseData)
requestId
- request Id, which has been returned by the method
umsRequest
errorCode
- error code identifying the problem in a request's processingerrorMessage
- error message identifying the problem in a request's processingresponseData
- results of the request processing in a channel driver. The request is referred by parameter requestId.
Key-value pairs from this parameter will be returned as ESP parameters to the original ESP request's
caller.void submitMessage(String requestId, com.genesyslab.platform.commons.collections.KeyValueCollection messageData) throws Exception
The driver extracts data from an inbound message and packs it into KeyValueCollection data structure, which is submitted to SM Server. SM Server unpacks the data and attaches key-value pairs received to the user data section of an interaction, which will be submitted to Interaction Server.
requestId
- unique Id of this message's submit requestmessageData
- message data arrived from media channelException
- if incorrect message data has been submittedcom.genesyslab.platform.commons.protocol.Message sendItxRequestAndWait(com.genesyslab.platform.commons.protocol.Message itxRequestMessage, long timeout) throws Exception
itxRequestMessage
- request to Interaction Servertimeout
- time to wait for responseException
- some problem has been detectedString getChatDescription(com.genesyslab.platform.commons.collections.KeyValueCollection messageData) throws Exception
SM Server tries to find active chat session for specified massage and returns chat session description or null value, if no corresponding chat session has been found.
Chat session description has the next format:
String.format("(userId:%s, sessionId:%s, parties:%s, '%s', %s)", chatRegUserId, chatSessionId, chatPartiesIds.toString(), nativePuName, basicChatProtocol.getEndpoint().getUri());
messageData
- message data, which has been sent by channel driver and has been used by SM Server to create chat
sessionException
- if incorrect message data has been submittedint getNextItxReferenceId()
Genesys.mcr.esp.ESPResponse sendUcsRequestAndWait(String service, String method, com.genesyslab.platform.commons.collections.KeyValueCollection parameters, com.genesyslab.platform.commons.collections.KeyValueCollection userdata, long timeout) throws Exception
service
- name of a service requested from Contact Servermethod
- name of a service's method requested from Contact Serverparameters
- parameters of the request to Contact Servertimeout
- time to wait for responseException
- some problem has been detectedboolean isUcsConnected()
Copyright © 2018 Genesys Telecommunications Laboratories Inc.. All rights reserved.