AsyncChannel
, AsyncChannelOperations
, AsyncInvokerSupport
, Channel
, ChannelListenerSupport
, ConfigurationSupport
, ConnectionInvokerSupport
, EndpointSupport
, InputChannel
, InterceptorSupport
, LogMessageFilterSupport
, MessageReceiver
, MessageReceiverManagement
, OutputChannel
, Protocol
, ProtocolDescriptionSupport
, Receiver
, ReceiverManagement
, RequestChannel
, RoutingServerProtocolHandshakeOptions
@Tag(sdkName="Routing", protocolName="RoutingServer") public class RoutingServerProtocol extends ClientChannel implements RoutingServerProtocolHandshakeOptions
RoutingServerProtocol
object to establish
communication between a client application and Universal Routing Server.
Here is a sample of how to establish communication with URS:
RoutingServerProtocol routingServerProtocol =
new RoutingServerProtocol(
new Endpoint(
routingServerEPName,
host,
port));
routingServerProtocol.setClientName(clientName);
routingServerProtocol.setClientType(ClientType.Generic);
routingServerProtocol.open();
When you are finished communicating with the server, you can close the
channel like this:
routingServerProtocol.close();
Note: Starting from Platform SDK 8.5.0 version, main protocol channel classes
(including RoutingServerProtocol
) are no longer "final
".AbstractChannel.AsyncErrorNotifier
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler
Modifier and Type | Field | Description |
---|---|---|
static ProtocolDescription |
PROTOCOL_DESCRIPTION |
Protocol signature (sdk and name) for this Channel.
|
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
messageFilter
DEF_INPUT_SIZE
Constructor | Description |
---|---|
RoutingServerProtocol() |
Creates instance of RoutingServerProtocol.
|
RoutingServerProtocol(Endpoint endpoint) |
Creates instance of RoutingServerProtocol.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
doSend(Message message) |
Sends the message unconditionally.
|
java.lang.String |
getClientName() |
Returns client name for the Universal Routing Server connection handshake.
|
java.lang.Integer |
getClientNumber() |
Client registration number from the Universal Routing Server side.
This value is initialized from the Universal Routing Server on handshake procedure. It is null if the protocol connection is not opened. |
ClientType |
getClientType() |
Returns client type for the Universal Routing Server connection handshake.
|
protected void |
onClose(ConnectionClosedEvent event) |
|
protected void |
onOpen() |
This method is called when channel is opened and just about
to call event handler.
|
protected void |
onReceiveMessage(Message message) |
Gives to subclass a chance to perform some operations on incoming
message arrival before delivering it to connection user code.
|
void |
setClientName(java.lang.String name) |
Sets the Universal Routing Server client name for connection handshake procedure.
|
void |
setClientType(ClientType type) |
Sets the Universal Routing Server client type for connection handshake procedure.
|
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, 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, createConnection, createConnectionClosedEvent, doBeginClose, doClose, 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
public static final ProtocolDescription PROTOCOL_DESCRIPTION
public RoutingServerProtocol()
public RoutingServerProtocol(Endpoint endpoint)
endpoint
- Parameters of the connection to createpublic void setClientName(java.lang.String name)
setClientName
in interface RoutingServerProtocolHandshakeOptions
name
- client namepublic java.lang.String getClientName()
getClientName
in interface RoutingServerProtocolHandshakeOptions
setClientName(String)
public void setClientType(ClientType type)
setClientType
in interface RoutingServerProtocolHandshakeOptions
type
- client typepublic ClientType getClientType()
getClientType
in interface RoutingServerProtocolHandshakeOptions
setClientType(ClientType)
public java.lang.Integer getClientNumber()
getClientNumber
in interface RoutingServerProtocolHandshakeOptions
protected void onOpen() throws ProtocolException
DuplexChannel
onOpen
in class ClientChannel
ProtocolException
- if there are problems during
post open operations (e.g. registration)protected void onClose(ConnectionClosedEvent event)
onClose
in class DuplexChannel
protected void doSend(Message message) throws ProtocolException
DuplexChannel
doSend
in class DuplexChannel
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 void onReceiveMessage(Message message)
DuplexChannel
onReceiveMessage
in class ClientChannel
message
- received messageSend comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.