AsyncChannel
, AsyncChannelOperations
, AsyncInvokerSupport
, Channel
, ChannelListenerSupport
, ConfigurationSupport
, ConnectionInvokerSupport
, EndpointSupport
, InputChannel
, InterceptorSupport
, LogMessageFilterSupport
, MessageReceiver
, MessageReceiverManagement
, OutputChannel
, Protocol
, ProtocolDescriptionSupport
, Receiver
, ReceiverManagement
, RequestChannel
, TServerProtocolHandshakeOptions
@Tag(sdkName="Voice", protocolName="TServer") public class TServerProtocol extends ClientChannel implements TServerProtocolHandshakeOptions
TServerProtocol
object to establish
communication between a client application and TServer.
Here is a sample of how to establish communication with TServer:
TServerProtocol tserverProtocol =
new TServerProtocol(
new Endpoint(
tserverEPName,
host,
port));
tserverProtocol.setClientName(clientName);
tserverProtocol.open();
When you are finished communicating with the server, you can close the
channel like this:
tserverProtocol.close();
Note: Starting from Platform SDK 8.5.0 version, main protocol channel classes
(including TServerProtocol
) are no longer "final
".AbstractChannel.AsyncErrorNotifier
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
APP_NAME_KEY |
Key for application name (used in T-Server logs).
|
static java.lang.String |
BACKUP_RECONNECT_INTERVAL_KEY |
Key for HA backup reconnection interval (THA_BRC_INTERVAL).
|
static java.lang.String |
PASS_KEY |
|
static ProtocolDescription |
PROTOCOL_DESCRIPTION |
Protocol signature (sdk and name) for this Channel.
|
static java.lang.String |
SWITCHOVER_TIMEOUT_KEY |
Key for HA switchover timeout (THA_SWO_TIMEOUT).
|
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
messageFilter
DEF_INPUT_SIZE
Constructor | Description |
---|---|
TServerProtocol() |
Creates instance of TServerProtocol.
|
TServerProtocol(Endpoint endpoint) |
Creates instance of TServerProtocol.
|
TServerProtocol(Endpoint endpoint,
long timeout) |
Creates instance of TServerProtocol.
|
Modifier and Type | Method | Description |
---|---|---|
protected Connection |
createConnection(Endpoint endpoint) |
|
java.lang.String |
getClientName() |
Returns client application name.
|
java.lang.String |
getClientPassword() |
Returns optional client application password.
|
KeyValuePrinter |
getTKVPrinter() |
|
protected void |
onSetEndpoint(Endpoint endpoint) |
This method is notified before setting a endpoint to the channel.
|
void |
sendAndClear(RequestPrivateService message) |
Sends a specified message and cancel using of it in further session recoveries.
|
void |
sendAndClear(RequestPrivateService message,
java.lang.Integer privateMessageId) |
Sends a specified message and cancel using of it in further session recoveries.
|
void |
sendAndStore(RequestPrivateService message) |
Sends a specified message and use it in further session recoveries.
|
void |
setClientName(java.lang.String appName) |
Sets client application name.
|
void |
setClientPassword(java.lang.String pass) |
Sets optional client application password.
|
void |
setLogMessageFilter(MessageFilter filter) |
Sets current message logining filter.
|
void |
setTKVPrinter(KeyValuePrinter printer) |
addChannelListener, configure, connectionContext, copyTLSSettings, fireClosed, fireErrorEvent, fireErrorEvent, generateChannelId, getChannelId, getConfiguration, getDefaultInvoker, getEndpoint, getListenerHelper, getServerContext, getState, getStateMods, getTimeout, getTimer, internal, 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, onReceiveMessage, 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, applyConfiguration, 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, onClose, onFireClosed, onFireErrorEvent, onFireOpened, open, openAsync, openAsync, processClose, processCloseAll, receive, receive, receivedMessage, releaseReceivers, removeListener, resetReceiver, resumeReading, send, setConnectionInvoker, setExternalTransport, setInputSize, 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
public static final ProtocolDescription PROTOCOL_DESCRIPTION
public static final java.lang.String APP_NAME_KEY
public static final java.lang.String PASS_KEY
public static final java.lang.String SWITCHOVER_TIMEOUT_KEY
public static final java.lang.String BACKUP_RECONNECT_INTERVAL_KEY
public TServerProtocol(Endpoint endpoint, long timeout)
endpoint
- Parameters of the connection to createtimeout
- Timeout to wait for message (in milliseconds)public TServerProtocol(Endpoint endpoint)
endpoint
- Parameters of the connection to createpublic TServerProtocol()
public void setTKVPrinter(KeyValuePrinter printer)
public KeyValuePrinter getTKVPrinter()
protected void onSetEndpoint(Endpoint endpoint)
AbstractChannel
onSetEndpoint
in class AbstractChannel
endpoint
- new endpointpublic void setClientName(java.lang.String appName)
ConnectionConfiguration
instance, but this method has greater priority.setClientName
in interface TServerProtocolHandshakeOptions
appName
- Client application namepublic java.lang.String getClientName()
ConnectionConfiguration
instance.getClientName
in interface TServerProtocolHandshakeOptions
setClientName(String)
public void setClientPassword(java.lang.String pass)
setClientPassword
in interface TServerProtocolHandshakeOptions
pass
- application passwordpublic java.lang.String getClientPassword()
getClientPassword
in interface TServerProtocolHandshakeOptions
setClientPassword(String)
protected Connection createConnection(Endpoint endpoint)
createConnection
in class DuplexChannel
public void setLogMessageFilter(MessageFilter filter)
LogMessageFilterSupport
setLogMessageFilter
in interface LogMessageFilterSupport
setLogMessageFilter
in class DuplexChannel
filter
- new message logining filter.public void sendAndStore(RequestPrivateService message) throws ProtocolException
message
- to be sent.ProtocolException
public void sendAndClear(RequestPrivateService message) throws ProtocolException
message
- to be sent.ProtocolException
public void sendAndClear(RequestPrivateService message, java.lang.Integer privateMessageId) throws ProtocolException
message
- to be sent.privateMessageId
- specifies private message id of a message which using in further session recoveries
must be canceled. If it is null then message.getPrivateMsgID
is used.ProtocolException
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.