public interface ChannelDriver
Channel driver interface is used by Digital Messaging Server to communicate with channel driver to connect/disconnect with channel, to send messages, etc.
Copyright (C) 2008-2018 Genesys Telecommunications Laboratories Inc.
All rights reserved.
Modifier and Type | Method and Description |
---|---|
void |
chatSessionNotification(String notification,
com.genesyslab.platform.commons.collections.KeyValueCollection messageData)
Notify channel driver about events in chat sessions initiated by this channel.
|
void |
configurationChanged(com.genesyslab.platform.commons.collections.KeyValueCollection kvcSectionsChanged,
com.genesyslab.platform.commons.collections.KeyValueCollection kvcSectionsCreated,
com.genesyslab.platform.commons.collections.KeyValueCollection kvcSectionsDeleted)
Notify channel driver about configuration changes.
|
void |
connect()
Start a channel driver's connection procedure with a channel.
|
void |
disconnect()
Start a channel driver's disconnection procedure with a channel.
|
void |
exeModeChanged(String exeMode)
Notify channel driver about changes of DMS execution mode.
|
int |
getAttachments(String interactionId,
AttachmentsProcessor attachmentsProcessor)
Ask a channel driver to fetch next attachment from channel.
|
String |
getName()
Get a channel driver's name.
|
com.genesyslab.platform.commons.collections.KeyValueCollection |
getService(String service,
String method,
com.genesyslab.platform.commons.collections.KeyValueCollection params)
Get a service from a channel.
|
String |
getVersion()
Get a channel driver's version.
|
void |
initialize(ChannelDriverPU channelDriverPU)
Initialize a channel driver.
|
boolean |
isConnected()
Get a channel's state of connection.
|
void |
shutdown()
Terminate a channel driver.
|
void |
submitMessageResult(String requestId,
boolean success,
com.genesyslab.platform.commons.collections.KeyValueCollection resultData)
Notify a channel driver about result of an inbound message processing.
|
String |
umsRequest(String serverRequestId,
String service,
String method,
com.genesyslab.platform.commons.collections.KeyValueCollection requestData)
Ask a channel driver to execute an ESP request (send outbound message, get user data, et al).
|
String getName()
String getVersion()
com.genesyslab.platform.commons.collections.KeyValueCollection getService(String service, String method, com.genesyslab.platform.commons.collections.KeyValueCollection params) throws Exception
service
- name of requested service.method
- name of requested service's method.params
- a set of parameters, which may be provided by a requester. The parameters detail a service's call. The
parameters' content is a channel-specific, i.e. a specific channel's driver is entirely responsible
for their parsing and processing. DMS extracts all attributes from ESP request (ESP parameters and
interaction's user data), packs them into 'KeyValueCollection' data structure and submits this
structure to a channel driver. Channel driver unpacks this data and processes the request. This is a
synchronous call, which requires an immediate quick response.Exception
- if errors were detected during execution, e.g. the media channel is not initialized successfully.void initialize(ChannelDriverPU channelDriverPU) throws Exception
channelDriverPU
- channel driver's processing unit (DMS component), which is used to get services from DMSException
- if errors were detected during executionvoid shutdown() throws Exception
Exception
- if errors were detected during executionvoid connect() throws Exception
Exception
- if errors were detected during executionvoid disconnect() throws Exception
Exception
boolean isConnected() throws Exception
Exception
void exeModeChanged(String exeMode)
exeMode
- "primary" | "backup"void configurationChanged(com.genesyslab.platform.commons.collections.KeyValueCollection kvcSectionsChanged, com.genesyslab.platform.commons.collections.KeyValueCollection kvcSectionsCreated, com.genesyslab.platform.commons.collections.KeyValueCollection kvcSectionsDeleted) throws Exception
Each parameter contains a set of list objects, which have been changed. Parameter may be an empty set; method KeyValueCollection.isEmpty() should be used to check a content of a parameter. List objects are named with respective configurataion's sections names. List objects from parameters kvcSectionsChanged and kvcSectionsCreated contain kv-pairs, where key is an option name and value is an option value. List objects from parameter kvcSectionsDeleted may be empty, if a whole configuration section has been deleted, or may contain kv-pairs, where key is an option name deleted and value is an empty string (which should be ignored).
kvcSectionsChanged
- configuration options sections in the server application object, where options' values have been
changedkvcSectionsCreated
- configuration options sections in the server application object, where new options have been createdkvcSectionsDeleted
- configuration options sections in the server application object, which have been deleted or where
options have been deletedException
String umsRequest(String serverRequestId, String service, String method, com.genesyslab.platform.commons.collections.KeyValueCollection requestData) throws Exception
DMS extracts all attributes from ESP request (ESP parameters and interaction's user data), packs them into
'KeyValueCollection' data structure (please, refer to Genesys Platform SDK) and submits this structure to a
channel driver. Channel driver unpacks this data and executes the request. A channel driver must inform DMS about
an ESP request processing results by an invoking method
umsResponse
or
umsFaultResponse
serverRequestId
- request Id, which has been assigned by SM Server to this requestservice
- name of requested service ('service' value from original ESP request). Value(s) of this parameter is
not a part of the interface. Every driver implementation may support its own set of services.method
- name of requested method ('method' value from original ESP request). Value(s) of this parameter is not
a part of the interface. Every driver implementation may support its own set of methods.requestData
- data related to the request. The data content is not a part of the interface: it is defined by a
driver implementation for a particular method. There is a recommendation to use a driver / media
channel-specific prefix for keys. It is also recommended to use, in combinations with a
driver-specific prefix, predefined keys from class ChannelDriverConstants
whenever it is applicable.Exception
- if errors were detected during executionvoid submitMessageResult(String requestId, boolean success, com.genesyslab.platform.commons.collections.KeyValueCollection resultData) throws Exception
requestId
- message submit request Id for an inbound message received by the driver and passed to DMS in parameter
'requestId' of method 'receivedInbMsg'success
- success indicator: true - the message has been successfully processed, false - failedresultData
- data related to the result.Exception
- if errors were detected during executionvoid chatSessionNotification(String notification, com.genesyslab.platform.commons.collections.KeyValueCollection messageData) throws Exception
notification
- "opened" | "closed"messageData
- message data, which has been sent by channel driver and has been used by DMS to create this chat
sessionException
int getAttachments(String interactionId, AttachmentsProcessor attachmentsProcessor) throws Exception
The method is used to fetch attachments for session mode only.
interactionId
- Interaction Id (Chat session Id equals to this value), which requests an attachment.attachmentsProcessor
- Data structure used by DMS and channel driver to exchange data during processing of attachments.Exception
Copyright © 2018 Genesys Telecommunications Laboratories Inc.. All rights reserved.