AsyncChannel
, AsyncChannelOperations
, AsyncInvokerSupport
, Channel
, ChannelListenerSupport
, ConfigurationSupport
, ConnectionInvokerSupport
, EndpointSupport
, InputChannel
, InterceptorSupport
, LogMessageFilterSupport
, MessageReceiver
, MessageReceiverManagement
, OutputChannel
, Protocol
, ProtocolDescriptionSupport
, Receiver
, ReceiverManagement
, RequestChannel
, StatServerProtocolHandshakeOptions
@Tag(sdkName="Reporting", protocolName="StatServer") public class StatServerProtocol extends ClientChannel implements StatServerProtocolHandshakeOptions
StatServerProtocol
object to establish
communication between a client application and Statistics Server.
Here is a sample of how to establish communication with Statistics
Server:
StatServerProtocol statServerProtocol =
new StatServerProtocol(
new Endpoint(
statServerEPName,
host,
port));
statServerProtocol.setClientName(clientName);
statServerProtocol.open();
When you are finished communicating with the server, you can close the
channel like this:
statServerProtocol.close();
Note: Starting from Platform SDK 8.5.0 version, main protocol channel classes
(including StatServerProtocol
) are no longer "final
".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
Constructor | Description |
---|---|
StatServerProtocol() |
Creates instance of StatServerProtocol.
|
StatServerProtocol(Endpoint endpoint) |
Creates instance of StatServerProtocol.
|
StatServerProtocol(Endpoint endpoint,
long timeout) |
Creates instance of StatServerProtocol.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
doSend(Message msg) |
Sends the message unconditionally.
|
int |
getClientId() |
Returns client id for the StatServer connection handshake.
|
java.lang.String |
getClientName() |
Returns client name for the StatServer connection handshake.
|
StatServerContext |
getServerContext() |
|
protected void |
onClose(ConnectionClosedEvent event) |
|
protected void |
onOpen() |
This method is called when channel is opened and just about
to call event handler.
|
void |
setClientId(int id) |
Sets the StatServer client id for connection handshake procedure.
|
void |
setClientName(java.lang.String name) |
Sets the StatServer client name for connection handshake procedure.
|
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, 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 StatServerProtocol(Endpoint endpoint, long timeout)
endpoint
- Parameters of the connection to createtimeout
- Timeout to wait for message (in milliseconds)public StatServerProtocol(Endpoint endpoint)
endpoint
- Parameters of the connection to createpublic StatServerProtocol()
public java.lang.String getClientName()
getClientName
in interface StatServerProtocolHandshakeOptions
setClientName(String)
public void setClientName(java.lang.String name)
setClientName
in interface StatServerProtocolHandshakeOptions
clientName
- client namepublic int getClientId()
getClientId
in interface StatServerProtocolHandshakeOptions
setClientId(int)
public void setClientId(int id)
setClientId
in interface StatServerProtocolHandshakeOptions
clientId
- client idpublic StatServerContext getServerContext()
getServerContext
in class AbstractChannel
protected void doSend(Message msg) throws ProtocolException
DuplexChannel
doSend
in class DuplexChannel
msg
- 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 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
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.