AsyncChannel
, AsyncChannelOperations
, AsyncInvokerSupport
, Channel
, ChannelListenerSupport
, ConfigurationSupport
, ConnectionInvokerSupport
, EndpointSupport
, InputChannel
, InterceptorSupport
, LogMessageFilterSupport
, MessageReceiver
, MessageReceiverManagement
, OutputChannel
, Protocol
, ProtocolDescriptionSupport
, Receiver
, ReceiverManagement
, RequestChannel
, UniversalContactServerProtocolHandshakeOptions
, RequestorInfoSupport
@Tag(sdkName="Contacts", protocolName="ContactServer") public class UniversalContactServerProtocol extends ExternalServiceProtocol implements UniversalContactServerProtocolHandshakeOptions
UniversalContactServerProtocol
object to establish
communication between an agent application (or other client application)
and Universal Contact Server.
Here is a sample of how to establish communication with UCS:
UniversalContactServerProtocol ucsProtocol =
new UniversalContactServerProtocol(
new Endpoint(
ucsEPName,
host,
port));
ucsProtocol.setClientName(clientName);
ucsProtocol.open();
When you are finished communicating with the server, you can close the
channel like this:
ucsProtocol.close();
Note: Starting from Platform SDK 8.5.0 version, main protocol channel classes
(including UniversalContactServerProtocol
) are no longer "final
".AbstractChannel.AsyncErrorNotifier
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
MULTIBYTES_DEFAULT_KEY |
Deprecated.
Use
USE_UTF_FOR_RESPONSES (='UseUtfForResponses') constant instead |
static ProtocolDescription |
PROTOCOL_DESCRIPTION |
|
static java.lang.String |
USE_UTF_FOR_REQUESTS |
Optional configuration option.
|
static java.lang.String |
USE_UTF_FOR_RESPONSES |
Optional configuration option.
|
static java.lang.String |
UTF_STRING_KEY |
Deprecated.
Use
USE_UTF_FOR_REQUESTS (='UseUtfForRequests') constant instead |
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
messageFilter
DEF_INPUT_SIZE
Constructor | Description |
---|---|
UniversalContactServerProtocol() |
Creates a new
UniversalContactServerProtocol object. |
UniversalContactServerProtocol(Endpoint endpoint) |
Creates a new
UniversalContactServerProtocol object. |
UniversalContactServerProtocol(Endpoint endpoint,
ReferenceBuilder refBuilder) |
Creates a new
UniversalContactServerProtocol object. |
Modifier and Type | Method | Description |
---|---|---|
protected void |
applyConfiguration() |
|
protected void |
doSend(Message message) |
Sends the message unconditionally.
|
protected static Message |
fromEsp(DuplexChannel channel,
Message esp) |
|
java.lang.String |
getClientApplicationType() |
Returns client application type for the Universal Contact Server connection.
|
java.lang.String |
getClientName() |
Returns client name for the Universal Contact Server connection handshake.
|
ProtocolDescription |
getProtocolDescription() |
|
protected void |
onReceiveMessage(Message incom) |
Gives to subclass a chance to perform some operations on incoming
message arrival before delivering it to connection user code.
|
protected static Message |
processReceivedMessage(DuplexChannel channel,
Message incom,
ILogger logger) |
|
protected static Message |
processSentMessage(DuplexChannel channel,
Message message,
boolean useUtf,
ReferenceBuilder referenceBuilder) |
|
static void |
registerServiceMethod(java.lang.String service,
java.lang.String method) |
Deprecated.
|
void |
setClientApplicationType(java.lang.String clientAppType) |
Sets client application type for the Universal Contact Server connection.
|
void |
setClientName(java.lang.String clientName) |
Sets the Universal Contact Server client name for connection handshake procedure.
|
protected static Message |
toEsp(DuplexChannel channel,
Message message,
boolean useUtfFor) |
addChannelListener, configure, connectionContext, copyTLSSettings, fireClosed, fireErrorEvent, fireErrorEvent, generateChannelId, getChannelId, getConfiguration, getDefaultInvoker, getEndpoint, getListenerHelper, getServerContext, getState, getStateMods, getTimeout, getTimer, internal, onSetEndpoint, releaseDefaultInvoker, removeChannelListener, setConfiguration, setInvoker, setServerContext, setState, setTimeout, throwNotClosed, throwNotOpened, throwNotOpenedOnClose, throwNotOpenedOnSend, throwNull, throwNullEndpoint
getState
setInvoker
close, getTimeout, open, setTimeout
addChannelListener, removeChannelListener
beginClose, beginOpen, beginRequest, close, close, closeAsync, closeAsync, disableConnectionOperations, doBeginRequest, doBeginRequest, doRequest, endRequest, endRequest, fireUnsolicitedEvents, getCopyResponse, getInvoker, getOpenTimeoutException, getReferenceBuilder, onOpen, onSend, onUnexpectedHandshakeMessage, open, openAsync, openAsync, request, request, requestAsync, requestAsync, setAddressResolver, setAddressResolverParams, setAddressResolverParams, setCopyResponse, setEndpoint, setHandshakeFinished, setHandshakePhase, setHandshakeUnsolicitedEventsPassLimit, setRegistrationHandler, setState, submitRegMessage, throwOnUnReferenceableRequest
configure, getConfiguration
setConnectionInvoker
addListener, cancelCloseTimeout, cancelOpenTimeout, clearInput, close, closeAsync, createChannelClosedEvent, createConnection, createConnectionClosedEvent, doBeginClose, doClose, downgradeConnection, getConnectionClosedCause, getDefaultRestriction, getEnpointPrefixInfo, getInputSize, getInterceptor, getLocalEndPoint, getLocalEndpointInfo, getLogMessageFilter, getProtocolFactory, getProtocolId, getRemoteEndPoint, getTimeoutException, initPackager, isMessageAllowed, notifyWithObject, onClose, onFireClosed, onFireErrorEvent, onFireOpened, open, openAsync, openAsync, processClose, processCloseAll, receive, receive, receivedMessage, releaseReceivers, removeListener, resetReceiver, resumeReading, send, setConnectionInvoker, setExternalTransport, setInputSize, setLogMessageFilter, setMessageHandler, setProtocolData, setReceiver, startUpgradeConnection, stopReading, toString, triggerWithObject, upgradeConnection, waitForObject, wrapInProtocolException
getEndpoint
fromEspRequestorInfo, getRequestorInfo, getTKVPrinter, setRequestorInfo, setTKVPrinter, toEspRequestorInfo
setMessageHandler
getInterceptor
receive, receive
setReceiver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, removeListener, send
getProtocolId
clearInput, getInputSize, releaseReceivers, setInputSize
resetReceiver
public static final ProtocolDescription PROTOCOL_DESCRIPTION
public static final java.lang.String USE_UTF_FOR_RESPONSES
@Deprecated public static final java.lang.String MULTIBYTES_DEFAULT_KEY
USE_UTF_FOR_RESPONSES
(='UseUtfForResponses') constant insteadUSE_UTF_FOR_RESPONSES
,
Constant Field Valuespublic static final java.lang.String USE_UTF_FOR_REQUESTS
@Deprecated public static final java.lang.String UTF_STRING_KEY
USE_UTF_FOR_REQUESTS
(='UseUtfForRequests') constant insteadUSE_UTF_FOR_REQUESTS
,
Constant Field Valuespublic UniversalContactServerProtocol()
UniversalContactServerProtocol
object.public UniversalContactServerProtocol(Endpoint endpoint)
UniversalContactServerProtocol
object.endpoint
- The endpoint (server) you wish to connect to.public UniversalContactServerProtocol(Endpoint endpoint, ReferenceBuilder refBuilder)
UniversalContactServerProtocol
object.endpoint
- The endpoint (server) you wish to connect to.refBuilder
- External instance of reference builder to be used.@Deprecated public static void registerServiceMethod(java.lang.String service, java.lang.String method)
public ProtocolDescription getProtocolDescription()
getProtocolDescription
in interface ProtocolDescriptionSupport
getProtocolDescription
in class DuplexChannel
public java.lang.String getClientName()
getClientName
in interface UniversalContactServerProtocolHandshakeOptions
setClientName(String)
public void setClientName(java.lang.String clientName)
setClientName
in interface UniversalContactServerProtocolHandshakeOptions
clientName
- client namepublic java.lang.String getClientApplicationType()
getClientApplicationType
in interface UniversalContactServerProtocolHandshakeOptions
setClientApplicationType(String)
public void setClientApplicationType(java.lang.String clientAppType)
setClientApplicationType
in interface UniversalContactServerProtocolHandshakeOptions
clientAppType
- client application typeprotected void applyConfiguration()
applyConfiguration
in class DuplexChannel
protected void doSend(Message message) throws ProtocolException
DuplexChannel
doSend
in class ExternalServiceProtocol
message
- message to sendProtocolException
- In the case of an unrecoverable protocol error. Client applications should not
try to deal with these exceptions, except for logging or displaying to users or technical administrators.
Check the exception cause for more details.protected static Message processSentMessage(DuplexChannel channel, Message message, boolean useUtf, ReferenceBuilder referenceBuilder) throws ProtocolException
ProtocolException
protected static Message toEsp(DuplexChannel channel, Message message, boolean useUtfFor) throws ProtocolException
ProtocolException
protected void onReceiveMessage(Message incom)
DuplexChannel
onReceiveMessage
in class ExternalServiceProtocol
incom
- received messageprotected static Message processReceivedMessage(DuplexChannel channel, Message incom, ILogger logger)
protected static Message fromEsp(DuplexChannel channel, Message esp)
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.