Platform SDK Java 8.5 API Reference

com.genesyslab.platform.webmedia.protocol
Class WebmediaChannel

java.lang.Object
  extended by com.genesyslab.platform.commons.protocol.AbstractChannel
      extended by com.genesyslab.platform.commons.protocol.DuplexChannel
          extended by com.genesyslab.platform.commons.protocol.ClientChannel
              extended by com.genesyslab.platform.webmedia.protocol.WebmediaChannel
All Implemented Interfaces:
AsyncChannel, AsyncChannelOperations, AsyncInvokerSupport, Channel, ChannelListenerSupport, ConfigurationSupport, ConnectionInvokerSupport, EndpointSupport, InputChannel, InterceptorSupport, LogMessageFilterSupport, MessageReceiver, MessageReceiverManagement, OutputChannel, Protocol, ProtocolDescriptionSupport, Receiver, ReceiverManagement, RequestChannel
Direct Known Subclasses:
CallbackProtocol, EmailProtocol, OptionalRegistrationChannel

public abstract class WebmediaChannel
extends ClientChannel

It's an abstract base class for all WebMedia protocols including BasicChat, FlexChat, Callback and XML based Email protocols. It initializes XML transport for protocol connection.

Specific logic is included here for handling of some XML exceptions. XML 1.0 specification accepts text values content with limited character range. Allowed characters are described here - http://www.w3.org/TR/REC-xml/#dt-character. By this way, server working with XML 1.0 specification will reject messages with illegal characters even if that values are properly encoded with entities like .
In this case it is possible to get error like 'SAXParseException: Character reference "" is an invalid XML character'.
Better solution in this case is to do not use illegal characters in WebMedia protocols: in chat messages, email messages bodies, email messages fields like subject, and so on - all text properties of all web media messages.
To help users to resolve this issue optional specific replacement logic has been added here. So, user can configure WebMedia protocols to automatically eliminate illegal characters before send. By this way wrong characters can be replaced with some marker or removed.
It can be done by two ways:

Replacement value property is optional. If it is not specified illegal chars will be removed.

See Also:
BasicChatProtocol, FlexChatProtocol, CallbackProtocol, EmailProtocol

Nested Class Summary
 
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.protocol.ClientChannel
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler
 
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel
AbstractChannel.AsyncErrorNotifier
 
Field Summary
static java.lang.String OPTION_NAME_ILLEGAL_UNICODE_CHARS_REPLACEMENT
           
static java.lang.String OPTION_NAME_REPLACE_ILLEGAL_UNICODE_CHARS
           
static java.lang.String OPTION_NAME_TARGET_XML_VERSION
           
 
Fields inherited from class com.genesyslab.platform.commons.protocol.DuplexChannel
messageFilter
 
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver
DEF_INPUT_SIZE
 
Fields inherited from interface com.genesyslab.platform.commons.protocol.Channel
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
 
Constructor Summary
WebmediaChannel(Endpoint endpoint, ProtocolFactory protocolFactory, ReferenceBuilder refBuilder, long timeout)
           
WebmediaChannel(ProtocolFactory protocolFactory, ReferenceBuilder refBuilder, long timeout)
           
 
Method Summary
 void applyConfiguration()
           
protected  Connection createConnection(Endpoint endpoint)
           
protected abstract  com.genesyslab.platform.commons.connection.impl.xml.ProtocolDialect getDialect()
           
protected  java.lang.String lookupConnectionParameter(java.lang.String propName, PsdkCustomization.PsdkOption psdkOption)
           
 
Methods inherited from class com.genesyslab.platform.commons.protocol.ClientChannel
beginClose, beginOpen, beginRequest, close, close, closeAsync, closeAsync, disableConnectionOperations, doBeginRequest, doBeginRequest, doRequest, endRequest, endRequest, fireUnsolicitedEvents, getCopyResponse, getInvoker, getOpenTimeoutException, getReferenceBuilder, onOpen, onReceiveMessage, onSend, onUnexpectedHandshakeMessage, open, openAsync, openAsync, request, request, requestAsync, requestAsync, setAddressResolver, setAddressResolverParams, setAddressResolverParams, setCopyResponse, setEndpoint, setHandshakeFinished, setHandshakePhase, setHandshakeUnsolicitedEventsPassLimit, setRegistrationHandler, setState, submitRegMessage, throwOnUnReferenceableRequest
 
Methods inherited from class com.genesyslab.platform.commons.protocol.DuplexChannel
addListener, cancelCloseTimeout, cancelOpenTimeout, clearInput, close, closeAsync, createChannelClosedEvent, createConnectionClosedEvent, doBeginClose, doClose, doSend, downgradeConnection, getDefaultRestriction, getEnpointPrefixInfo, getInputSize, getInterceptor, getLocalEndPoint, getLocalEndpointInfo, getLogMessageFilter, getProtocolDescription, 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
 
Methods inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel
addChannelListener, configure, connectionContext, copyTLSSettings, fireClosed, fireErrorEvent, fireErrorEvent, generateChannelId, getChannelId, getConfiguration, getDefaultInvoker, getEndpoint, getListenerHelper, getServerContext, getState, getStateMods, getTimeout, internal, onSetEndpoint, releaseDefaultInvoker, removeChannelListener, setConfiguration, setInvoker, setServerContext, setState, setTimeout, throwNotClosed, throwNotOpened, throwNotOpenedOnClose, throwNotOpenedOnSend, throwNull, throwNullEndpoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Protocol
getProtocolId
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.InputChannel
setMessageHandler
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiver
receive, receive
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Receiver
clearInput, getInputSize, releaseReceivers, setInputSize
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.OutputChannel
addListener, removeListener, send
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Channel
close, getTimeout, open, setTimeout
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncChannel
getState
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ChannelListenerSupport
addChannelListener, removeChannelListener
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.InterceptorSupport
getInterceptor
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiverManagement
setReceiver
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ReceiverManagement
resetReceiver
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConfigurationSupport
configure, getConfiguration
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.EndpointSupport
getEndpoint
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ProtocolDescriptionSupport
getProtocolDescription
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncInvokerSupport
setInvoker
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConnectionInvokerSupport
setConnectionInvoker
 

Field Detail

OPTION_NAME_TARGET_XML_VERSION

public static final java.lang.String OPTION_NAME_TARGET_XML_VERSION
See Also:
Constant Field Values

OPTION_NAME_REPLACE_ILLEGAL_UNICODE_CHARS

public static final java.lang.String OPTION_NAME_REPLACE_ILLEGAL_UNICODE_CHARS
See Also:
Constant Field Values

OPTION_NAME_ILLEGAL_UNICODE_CHARS_REPLACEMENT

public static final java.lang.String OPTION_NAME_ILLEGAL_UNICODE_CHARS_REPLACEMENT
See Also:
Constant Field Values
Constructor Detail

WebmediaChannel

public WebmediaChannel(ProtocolFactory protocolFactory,
                       ReferenceBuilder refBuilder,
                       long timeout)

WebmediaChannel

public WebmediaChannel(Endpoint endpoint,
                       ProtocolFactory protocolFactory,
                       ReferenceBuilder refBuilder,
                       long timeout)
Method Detail

createConnection

protected Connection createConnection(Endpoint endpoint)
Overrides:
createConnection in class DuplexChannel

getDialect

protected abstract com.genesyslab.platform.commons.connection.impl.xml.ProtocolDialect getDialect()

applyConfiguration

public void applyConfiguration()
Overrides:
applyConfiguration in class DuplexChannel

lookupConnectionParameter

protected java.lang.String lookupConnectionParameter(java.lang.String propName,
                                                     PsdkCustomization.PsdkOption psdkOption)

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.