AsyncChannel
, AsyncChannelOperations
, AsyncInvokerSupport
, Channel
, ChannelListenerSupport
, ConfigurationSupport
, ConnectionInvokerSupport
, EndpointSupport
, InputChannel
, InterceptorSupport
, LogMessageFilterSupport
, MessageReceiver
, MessageReceiverManagement
, OutputChannel
, Protocol
, ProtocolDescriptionSupport
, Receiver
, ReceiverManagement
, RequestChannel
, SolutionControlServerProtocolHandshakeOptions
@Tag(sdkName="Management", protocolName="SolutionControlServer") public class SolutionControlServerProtocol extends ClientChannel implements SolutionControlServerProtocolHandshakeOptions
SolutionControlServerProtocol
object to establish
communication between an agent application (or other client application)
and Solution ControlServer.
Here is the sample of how to open connection to Solution Control Server
and retrieve actual information about application.
SolutionControlServerProtocol protocol =
new SolutionControlServerProtocol(
new Endpoint(name, host, port));
protocol.open();
RequestApplicationInfo rai = RequestApplicationInfo.create();
// Application clientId which status we want to know
rai.setControlObjectId(applicationId);
try {
EventInfo responce = (EventInfo) protocol.request(rai);
WriteToLog(responce.Name);
} catch (Exception exception) {
WriteToLog(
"Exception while sending request to interaction server: "
+ exception);
}
protocol.close();
If you want to receive notifications from Solution Control Server
about application status changing you should execute subscribe request.
RequestSubscribe rs = RequestSubscribe.create();
rs.setControlObjectId(applicationId);
rs.setControlObjectType(ControlObjectType.Application);
Message msg = protocol.request(rs);
After subscribe you can listen SCS for notifications:
Message recMsg = protocol.receive();
if (recMsg instanceof EventInfo) {
WriteToLog("Current status: " + ((EventInfo) recMsg).getDescription());
}
Note: Starting from Platform SDK 8.5.0 version, main protocol channel classes
(including SolutionControlServerProtocol
) are no longer "final
".AbstractChannel.AsyncErrorNotifier
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
messageFilter
DEF_INPUT_SIZE
Constructor | Description |
---|---|
SolutionControlServerProtocol() |
Creates a new
SolutionControlServerProtocol object. |
SolutionControlServerProtocol(Endpoint endpoint) |
Creates a new
SolutionControlServerProtocol object. |
Modifier and Type | Method | Description |
---|---|---|
int |
getClientId() |
Returns client application DBID.
|
java.lang.String |
getClientName() |
Returns client application name.
|
ControlObjectType |
getClientType() |
Returns SCS client type.
Default value is ControlObjectType.Application . |
int |
getConnectCode() |
|
ControlObjectType |
getControlObjectType() |
Deprecated.
|
java.lang.String |
getUserName() |
Returns user name handshake property.
|
protected void |
onOpen() |
This method is called when channel is opened and just about
to call event handler.
|
void |
setClientId(int value) |
Sets client application DBID.
|
void |
setClientName(java.lang.String value) |
Sets client application name.
|
void |
setClientType(ControlObjectType value) |
Sets SCS client type.
Default value is ControlObjectType.Application . |
void |
setControlObjectType(ControlObjectType value) |
Deprecated.
|
void |
setUserName(java.lang.String value) |
Sets user name handshake property.
|
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, 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, createConnection, 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, 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 SolutionControlServerProtocol()
SolutionControlServerProtocol
object.public SolutionControlServerProtocol(Endpoint endpoint)
SolutionControlServerProtocol
object.endpoint
- The endpoint (server) you wish to connect to.public int getClientId()
getClientId
in interface SolutionControlServerProtocolHandshakeOptions
setClientId(int)
public void setClientId(int value)
setClientId
in interface SolutionControlServerProtocolHandshakeOptions
clientId
- client application DBIDpublic ControlObjectType getControlObjectType()
getClientType()
public void setControlObjectType(ControlObjectType value)
setClientType(ControlObjectType)
public int getConnectCode()
public java.lang.String getUserName()
getUserName
in interface SolutionControlServerProtocolHandshakeOptions
setUserName(String)
public void setUserName(java.lang.String value)
setUserName
in interface SolutionControlServerProtocolHandshakeOptions
userName
- user namepublic java.lang.String getClientName()
getClientName
in interface SolutionControlServerProtocolHandshakeOptions
setClientName(String)
public void setClientName(java.lang.String value)
setClientName
in interface SolutionControlServerProtocolHandshakeOptions
clientName
- client application namepublic ControlObjectType getClientType()
ControlObjectType.Application
.getClientType
in interface SolutionControlServerProtocolHandshakeOptions
setClientType(ControlObjectType)
,
ControlObjectType
public void setClientType(ControlObjectType value)
ControlObjectType.Application
.setClientType
in interface SolutionControlServerProtocolHandshakeOptions
clientType
- client typeControlObjectType
protected void onOpen() throws ProtocolException
DuplexChannel
onOpen
in class ClientChannel
ProtocolException
- if there are problems during
post open operations (e.g. registration)Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.