AsyncChannel
, AsyncChannelOperations
, AsyncInvokerSupport
, Channel
, ChannelListenerSupport
, ConfigurationSupport
, ConnectionInvokerSupport
, EndpointSupport
, InputChannel
, InterceptorSupport
, LogMessageFilterSupport
, MessageReceiver
, MessageReceiverManagement
, OutputChannel
, Protocol
, ProtocolDescriptionSupport
, Receiver
, ReceiverManagement
, RequestChannel
, BasicChatProtocolHandshakeOptions
@Tag(sdkName="WebMedia", protocolName="BasicChat") public class BasicChatProtocol extends OptionalRegistrationChannel implements BasicChatProtocolHandshakeOptions
AbstractChannel.AsyncErrorNotifier
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler
Modifier and Type | Field | Description |
---|---|---|
static ProtocolDescription |
PROTOCOL_DESCRIPTION |
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
messageFilter
DEF_INPUT_SIZE
OPTION_NAME_ILLEGAL_UNICODE_CHARS_REPLACEMENT, OPTION_NAME_REPLACE_ILLEGAL_UNICODE_CHARS, OPTION_NAME_TARGET_XML_VERSION
Constructor | Description |
---|---|
BasicChatProtocol() |
Creates instance of BasicChatProtocol.
|
BasicChatProtocol(Endpoint endpoint) |
Creates instance of BasicChatProtocol.
|
BasicChatProtocol(Endpoint endpoint,
long timeout) |
Creates instance of BasicChatProtocol.
|
Modifier and Type | Method | Description |
---|---|---|
protected com.genesyslab.platform.commons.connection.impl.xml.ProtocolDialect |
getDialect() |
|
protected ClientChannel.ClientHandshakeStep |
getHandshakeStart() |
This virtual method returns initial handshake step for this channel.
|
java.lang.String |
getPersonId() |
|
java.lang.String |
getSecureKey() |
Optional, if set with UserId, channel will use it to restore previously registered session.
|
BasicChatServerContext |
getServerContext() |
|
int |
getTimeZoneOffset() |
Optional, timezone offset.
|
KeyValueCollection |
getUserData() |
Optional, used for user identification in UCS (Universal Contact Server).
|
java.lang.String |
getUserId() |
|
java.lang.String |
getUserNickname() |
|
UserType |
getUserType() |
|
boolean |
isAutoRegister() |
Returns flag for automatic client registration request on connection open.
By default it is enabled, but sometimes it may be required to do some other operations before client registration request, or there is a need to create custom registration request. In this case user may disable automatic registration and later (after the connection opened) send own registration request. |
protected void |
onClose(ConnectionClosedEvent event) |
|
protected void |
onEventRegistered(EventRegistered event) |
This method is called on successful response to the client Auto-Registration request.
|
protected void |
onOpen() |
This method is called when channel is opened and just about
to call event handler.
|
protected void |
onSend(Message message) |
Gives to subclass a chance to modify message before sending it
to remote party.
|
void |
setAutoRegister(boolean autoRegister) |
Sets flag for automatic client registration request on connection open.
By default it is enabled, but sometimes it may be required to do some other operations before client registration request, or there is a need to create custom registration request. In this case user may disable automatic registration and later (after the connection opened) send own registration request. |
void |
setPersonId(java.lang.String personId) |
|
void |
setSecureKey(java.lang.String secureKey) |
Optional, if set with UserId, channel will use it to restore previously registered session.
|
void |
setTimeZoneOffset(int timeZoneOffset) |
Optional, timezone offset.
|
void |
setUserData(KeyValueCollection userData) |
Optional, used for user identification in UCS (Universal Contact Server).
|
void |
setUserId(java.lang.String userId) |
|
void |
setUserNickname(java.lang.String userNickname) |
|
void |
setUserType(UserType userType) |
addChannelListener, configure, connectionContext, copyTLSSettings, fireClosed, fireErrorEvent, fireErrorEvent, generateChannelId, getChannelId, getConfiguration, getDefaultInvoker, getEndpoint, getListenerHelper, 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, onReceiveMessage, 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, createConnectionClosedEvent, doBeginClose, doClose, doSend, downgradeConnection, getConnectionClosedCause, getDefaultRestriction, getEnpointPrefixInfo, getInputSize, getInterceptor, getLocalEndPoint, getLocalEndpointInfo, getLogMessageFilter, getProtocolDescription, getProtocolFactory, getProtocolId, getRemoteEndPoint, getTimeoutException, initPackager, isMessageAllowed, notifyWithObject, 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
setMessageHandler
getInterceptor
receive, receive
setReceiver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, removeListener, send
getProtocolId
getProtocolDescription
clearInput, getInputSize, releaseReceivers, setInputSize
resetReceiver
applyConfiguration, createConnection, lookupConnectionParameter
public static final ProtocolDescription PROTOCOL_DESCRIPTION
public BasicChatProtocol(Endpoint endpoint, long timeout)
endpoint
- Parameters of the connection to createtimeout
- Timeout to wait for message (in milliseconds)public BasicChatProtocol(Endpoint endpoint)
endpoint
- Parameters of the connection to createpublic BasicChatProtocol()
public int getTimeZoneOffset()
getTimeZoneOffset
in interface BasicChatProtocolHandshakeOptions
public void setTimeZoneOffset(int timeZoneOffset)
setTimeZoneOffset
in interface BasicChatProtocolHandshakeOptions
timeZoneOffset
- timezone offsetpublic KeyValueCollection getUserData()
getUserData
in interface BasicChatProtocolHandshakeOptions
public void setUserData(KeyValueCollection userData)
setUserData
in interface BasicChatProtocolHandshakeOptions
userData
- user datapublic java.lang.String getUserNickname()
getUserNickname
in interface BasicChatProtocolHandshakeOptions
public void setUserNickname(java.lang.String userNickname)
setUserNickname
in interface BasicChatProtocolHandshakeOptions
public UserType getUserType()
getUserType
in interface BasicChatProtocolHandshakeOptions
public void setUserType(UserType userType)
setUserType
in interface BasicChatProtocolHandshakeOptions
public java.lang.String getPersonId()
getPersonId
in interface BasicChatProtocolHandshakeOptions
public void setPersonId(java.lang.String personId)
setPersonId
in interface BasicChatProtocolHandshakeOptions
public java.lang.String getUserId()
getUserId
in interface BasicChatProtocolHandshakeOptions
public void setUserId(java.lang.String userId)
setUserId
in interface BasicChatProtocolHandshakeOptions
public java.lang.String getSecureKey()
getSecureKey
in interface BasicChatProtocolHandshakeOptions
public void setSecureKey(java.lang.String secureKey)
setSecureKey
in interface BasicChatProtocolHandshakeOptions
secureKey
- secure keypublic boolean isAutoRegister()
isAutoRegister
in interface BasicChatProtocolHandshakeOptions
isAutoRegister
in class OptionalRegistrationChannel
setAutoRegister(boolean)
,
RequestRegister
public void setAutoRegister(boolean autoRegister)
setAutoRegister
in interface BasicChatProtocolHandshakeOptions
setAutoRegister
in class OptionalRegistrationChannel
autoRegister
- flag for automatic client registration request allowingRequestRegister
public BasicChatServerContext getServerContext()
getServerContext
in class AbstractChannel
protected void onSend(Message message) throws ProtocolException
DuplexChannel
onSend
in class ClientChannel
message
- Message to modifyProtocolException
- 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 void onOpen() throws ProtocolException
DuplexChannel
onOpen
in class OptionalRegistrationChannel
ProtocolException
- if there are problems during
post open operations (e.g. registration)protected void onClose(ConnectionClosedEvent event)
onClose
in class DuplexChannel
protected void onEventRegistered(EventRegistered event)
protected com.genesyslab.platform.commons.connection.impl.xml.ProtocolDialect getDialect()
getDialect
in class WebmediaChannel
protected ClientChannel.ClientHandshakeStep getHandshakeStart()
OptionalRegistrationChannel
getHandshakeStart
in class OptionalRegistrationChannel
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.