Platform SDK Java 8.5 API Reference

com.genesyslab.platform.configuration.protocol
Class ConfServerProtocol

java.lang.Object
  extended by com.genesyslab.platform.commons.protocol.AbstractChannel
      extended by com.genesyslab.platform.commons.protocol.DuplexChannel
          extended by com.genesyslab.platform.commons.protocol.ClientChannel
              extended by com.genesyslab.platform.configuration.protocol.ConfServerProtocol
All Implemented Interfaces:
AsyncChannel, AsyncChannelOperations, AsyncInvokerSupport, Channel, ChannelListenerSupport, ConfigurationSupport, ConnectionInvokerSupport, EndpointSupport, InputChannel, InterceptorSupport, LogMessageFilterSupport, MessageReceiver, MessageReceiverManagement, OutputChannel, Protocol, ProtocolDescriptionSupport, Receiver, ReceiverManagement, RequestChannel, ConfServerProtocolHandshakeOptions

@ProtocolDescription.Tag(sdkName="Configuration",
                         protocolName="ConfServer")
public class ConfServerProtocol
extends ClientChannel
implements ConfServerProtocolHandshakeOptions

Use a ConfServerProtocol object to establish communication between application and Genesys Configuration Server.

Here is a sample of how to establish communication:

 ConfServerProtocol confProtocol =
     new ConfServerProtocol(
         new Endpoint(csEPName, host, port));
 confProtocol.setClientApplicationType(CfgAppType.CFGGenericClient.ordinal());
 confProtocol.setClientName(myGenericClientAppName);
 confProtocol.setUserName(username);
 confProtocol.setUserPassword(password);
 confProtocol.open();
 
When you are finished communicating with the server, you can close the channel like this:
 confProtocol.close();
 
The session can be restored after the connection lost if the UseSession flag was assigned to 'true' before reopening the configuration server protocol channel
 confProtocol.setUseSession(true);
 //...
 confProtocol.open();
 
After session will be restored confProtocol.getContext().isSessionRestored() will return true and no needs repeat to send RequestRegisterNotification, you will receive automatically all changes for registered objects.


The Configuration Server supports Kerberos authentication.
PSDK provides API to using this functionality.

Samples for using SSO authentication with Configuration Server:

Connecting with KERBEROS authorization as current logining user
(using default authentication ticket acquirer)

 // You can change default ticket acquirer using next code:
 //    System.setProperty("com.genesys.protocol.auth.ticket.acquirer",
 //                       "com.genesyslab.platform.commons.protocol.auth.KerberosTicketAcquirer");
 
 // Set Kerberos configuration file location:
 System.setProperty("java.security.krb5.conf ", "c:/windows/system32/krb5.conf");
 
 // Service Principal Name
 String SPN = "ConfigServerMT64/srv-1.t8.local@CAPITAL_DOMAIN_NAME";
 
 Endpoint  endpoint = new Endpoint("default", CONFIG_SERVER_HOST, CONFIG_SERVER_PORT).setSPN(SPN);
 ConfServerProtocol protocol = new ConfServerProtocol(endpoint);
 protocol.setClientName("default");
 protocol.setClientApplicationType(CfgAppType.CFGSCE.ordinal());
 protocol.open();
 

Connecting with KERBEROS authorization
(using custom authentication ticket acquirer)

 // Set Kerberos configuration file location:
 System.setProperty("java.security.krb5.conf ", "c:/windows/system32/krb5.conf");
 
 Endpoint  endpoint = new Endpoint("default", CONFIG_SERVER_HOST, CONFIG_SERVER_PORT);
 ConfServerProtocol protocol = new ConfServerProtocol(endpoint);
 protocol.setClientName("default");
 protocol.setClientApplicationType(CfgAppType.CFGSCE.ordinal());
 
 // You can use your custom implementation instead our ones (KerberosTicketAcquirer, RawDataTicketAcquirer)
 byte[] GSS_KERBEROS_TICKET_BYTES = ... 
 AuthTicketAcquirer ticketAcquirer = new RawDataTicketAcquirer(GSS_KERBEROS_TICKET_BYTES);
 protocol.setTicketAcquirer(ticketAcquirer);
 
 protocol.open();
 

Connecting with KERBEROS authorization using user name (UPN) and password

 // Service Principal Name
 String SPN = "ConfigServerMT64/srv-1.t8.local@CAPITAL_DOMAIN_NAME";
 
 // Set Kerberos configuration file location:
 System.setProperty("java.security.krb5.conf ", "c:/windows/system32/krb5.conf");
 
 Endpoint  endpoint = new Endpoint("default", CONFIG_SERVER_HOST, CONFIG_SERVER_PORT).setSPN(SPN);
 ConfServerProtocol protocol = new ConfServerProtocol(endpoint);
 protocol.setClientName("default");
 protocol.setClientApplicationType(CfgAppType.CFGSCE.ordinal());
 
 String UPN = "TheUserName@CAPITAL_DOMAIN_NAME";
 char[] PWD = {'x', 'x', 'x'};
 CallbackHandler ch = new LoginCallbackHandler(UPN, PWD);
 AuthTicketAcquirer ticketAcquirer = new KerberosTicketAcquirer(UPN,ch);
 protocol.setTicketAcquirer(ticketAcquirer);
 
 protocol.open();
 

Note: Starting from Platform SDK 8.5.0 version, main protocol channel classes (including ConfServerProtocol) are no longer "final".
It helps with applications unit testing. At the same time it opens access and allows to override protocols internal protected staff from custom child classes.
Changes or extensions of the protocols functionality in child classes must be done very carefully with clear understanding of affected components and functionality.
Also, protected PSDK methods and elements are not a part of public API, and may be a subject for changes without special notice. So, application, which uses or overrides internal/protected staff, may have compatibility issues on PSDK update.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.protocol.ClientChannel
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler
 
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel
AbstractChannel.AsyncErrorNotifier
 
Field Summary
static java.lang.String CONF_OBJECTS_NAMESPACE
          Deprecated.  
static ProtocolDescription PROTOCOL_DESCRIPTION
          Protocol signature (sdk and name) for this Channel.
 
Fields inherited from class com.genesyslab.platform.commons.protocol.DuplexChannel
messageFilter
 
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver
DEF_INPUT_SIZE
 
Fields inherited from interface com.genesyslab.platform.commons.protocol.Channel
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
 
Constructor Summary
ConfServerProtocol()
          Creates a new ConfServerProtocol object.
ConfServerProtocol(Endpoint endpoint)
          Creates a new ConfServerProtocol object.
ConfServerProtocol(Endpoint endpoint, boolean initCrypto)
          Creates a new ConfServerProtocol object.
ConfServerProtocol(Endpoint endpoint, long timeout, boolean initCrypto)
          Please note that initializing cryptoengine can take some time, so if you are absolutely sure your server doesn't (and won't) support AES encrypting set the initCrypt parameter to false.
 
Method Summary
 int getClientApplicationType()
          Returns type of the client application as defined in CfgAppType enumeration.
 java.lang.String getClientName()
          Returns client applications' name.
 ConfServerContext getServerContext()
          ConfServerContext property gets protocol context of Configuration Server ConfServerProtocol opened connection with.
 AuthTicketAcquirer getTicketAcquirer()
          Gets custom Kerberos ticket acquirer.
 boolean getUseConfDataNs()
          Deprecated.  
 boolean getUseDeltaOptimization()
          Deprecated. The method has been deprecated.
 boolean getUseForwardCompatibility()
          Deprecated. The method has been deprecated.
 java.lang.String getUserName()
          Returns the name of a user in the Genesys Configuration Layer.
 java.lang.String getUserPassword()
          Deprecated. The getter behaviour has been changed. Now it returns only empty string or null.
 boolean getUseSession()
          Gets session usage flag.
static void initCrypto()
          Usually initializing of cryptoengine takes a lot of time and can cause timeouts if will be performed during open procedure.
 CfgMetadata loadLocalization(java.lang.Integer lcId)
          Requests localization settings from configuration server and initializes protocol meta data with its response.
It uses RequestReadLocale/EventLocaleRead for this.
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.
protected  void onSend(Message message)
          Gives to subclass a chance to modify message before sending it to remote party.
 void setClientApplicationType(int clientType)
          Sets type of the client application as defined in CfgAppType enumeration.
 void setClientName(java.lang.String clientName)
          Sets client applications' name.
 void setTicketAcquirer(AuthTicketAcquirer ticketAcquirer)
          Sets custom Kerberos ticket acquirer.
 void setTKVPrinter(KeyValuePrinter printer)
           
 void setUseConfDataNs(boolean useConfDataNs)
          Deprecated.  
 void setUseDeltaOptimization(boolean value)
          Deprecated. The method has been deprecated.
 void setUseForwardCompatibility(boolean value)
          Deprecated. The method has been deprecated.
 void setUseLocalization(boolean value)
          Sets flag for retrieving and adding the information from data resource repository corresponding to the default localization settings.
If this value is set to true, the handshake procedure will use specific configuration server protocol request to retrieve localization information (RequestReadLocale).
 void setUserName(java.lang.String userName)
          Sets the name of a user in the Genesys Configuration Layer.
 void setUserPassword(java.lang.String userPassword)
          Sets the password of a user in the Genesys Configuration Layer.
 void setUseSession(boolean useSession)
          Sets session usage flag.
 void useChangePasswordRegistration(java.lang.String newUserPassword)
          UseChangePasswordRegistration(String newUserPassword) method is used when the protocol's user is marked for password change in the CME environment.
 boolean useLocalization()
          Returns flag for retrieving and adding the information from data resource repository corresponding to the default localization settings.
If this value is set to true, the handshake procedure will use specific configuration server protocol request to retrieve localization information (RequestReadLocale).
 
Methods inherited from class com.genesyslab.platform.commons.protocol.ClientChannel
beginClose, beginOpen, beginRequest, close, close, closeAsync, closeAsync, disableConnectionOperations, doBeginRequest, doBeginRequest, doRequest, endRequest, endRequest, fireUnsolicitedEvents, getCopyResponse, getInvoker, getOpenTimeoutException, getReferenceBuilder, onUnexpectedHandshakeMessage, open, openAsync, openAsync, request, request, requestAsync, requestAsync, setAddressResolver, setAddressResolverParams, setAddressResolverParams, setCopyResponse, setEndpoint, setHandshakeFinished, setHandshakePhase, setHandshakeUnsolicitedEventsPassLimit, setRegistrationHandler, setState, submitRegMessage, throwOnUnReferenceableRequest
 
Methods inherited from class com.genesyslab.platform.commons.protocol.DuplexChannel
addListener, applyConfiguration, cancelCloseTimeout, cancelOpenTimeout, clearInput, close, closeAsync, createChannelClosedEvent, createConnection, createConnectionClosedEvent, doBeginClose, doClose, doSend, downgradeConnection, 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
 
Methods inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel
addChannelListener, configure, connectionContext, copyTLSSettings, fireClosed, fireErrorEvent, fireErrorEvent, generateChannelId, getChannelId, getConfiguration, getDefaultInvoker, getEndpoint, getListenerHelper, getState, getStateMods, getTimeout, internal, onSetEndpoint, releaseDefaultInvoker, removeChannelListener, setConfiguration, setInvoker, setServerContext, setState, setTimeout, throwNotClosed, throwNotOpened, throwNotOpenedOnClose, throwNotOpenedOnSend, throwNull, throwNullEndpoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Protocol
getProtocolId
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.InputChannel
setMessageHandler
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiver
receive, receive
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Receiver
clearInput, getInputSize, releaseReceivers, setInputSize
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.OutputChannel
addListener, removeListener, send
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Channel
close, getTimeout, open, setTimeout
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncChannel
getState
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ChannelListenerSupport
addChannelListener, removeChannelListener
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.InterceptorSupport
getInterceptor
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiverManagement
setReceiver
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ReceiverManagement
resetReceiver
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConfigurationSupport
configure, getConfiguration
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.EndpointSupport
getEndpoint
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ProtocolDescriptionSupport
getProtocolDescription
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncInvokerSupport
setInvoker
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConnectionInvokerSupport
setConnectionInvoker
 

Field Detail

CONF_OBJECTS_NAMESPACE

@Deprecated
public static final java.lang.String CONF_OBJECTS_NAMESPACE
Deprecated. 
System property to indicate if ConfServerProtocol should use namespace constructing configuration objects (xml).
This property is deprecated and is not used any more.

See Also:
Constant Field Values

PROTOCOL_DESCRIPTION

public static final ProtocolDescription PROTOCOL_DESCRIPTION
Protocol signature (sdk and name) for this Channel.

Constructor Detail

ConfServerProtocol

public ConfServerProtocol()
Creates a new ConfServerProtocol object.


ConfServerProtocol

public ConfServerProtocol(Endpoint endpoint)
Creates a new ConfServerProtocol object.

Parameters:
endpoint - The endpoint (server) you wish to connect to

ConfServerProtocol

public ConfServerProtocol(Endpoint endpoint,
                          boolean initCrypto)
Creates a new ConfServerProtocol object.

Parameters:
endpoint - The endpoint (server) you wish to connect to
initCrypto - whether to initialize cryptographic engine during construction.

ConfServerProtocol

public ConfServerProtocol(Endpoint endpoint,
                          long timeout,
                          boolean initCrypto)
Please note that initializing cryptoengine can take some time, so if you are absolutely sure your server doesn't (and won't) support AES encrypting set the initCrypt parameter to false. Alternatively you can increase the timeout needed for open and let registration procedure to initialize cryptographic engine on-demand.

Parameters:
endpoint - server to connect to
timeout - timeout for protocol operations
initCrypto - whether to initialize cryptoengine during construction
Method Detail

useChangePasswordRegistration

public void useChangePasswordRegistration(java.lang.String newUserPassword)
UseChangePasswordRegistration(String newUserPassword) method is used when the protocol's user is marked for password change in the CME environment.

When a person/user is marked for password change in the CME environment, calling the DuplexChannel.open() method will throw ChangePasswordException.

When user application get ChangePasswordException, it may use useChangePasswordRegistration(String) method before the channel opening (before calling the DuplexChannel.open() again). The protocol will use a different registration request changing the user password to the new value during the channel opening handshake. If the client/user registration is successful, the UserPassword is changed to the new user password value.

Specified by:
useChangePasswordRegistration in interface ConfServerProtocolHandshakeOptions
Parameters:
newUserPassword - new password for the user/person
Throws:
ChannelNotClosedException - when channel isn't closed
See Also:
ChangePasswordException, DuplexChannel.open()

getServerContext

public ConfServerContext getServerContext()
ConfServerContext property gets protocol context of Configuration Server ConfServerProtocol opened connection with.

Overrides:
getServerContext in class AbstractChannel
Returns:
configuration server connection context

initCrypto

public static void initCrypto()
Usually initializing of cryptoengine takes a lot of time and can cause timeouts if will be performed during open procedure. So, by default this step is performed during construction of the ConfServerProtocol. Use this method if you want to perform it earlier.


getUseConfDataNs

@Deprecated
public boolean getUseConfDataNs()
Deprecated. 

Indicates if namespace is used when creating configuration objects' data.

Returns:
It always returns true.

setUseConfDataNs

@Deprecated
public void setUseConfDataNs(boolean useConfDataNs)
Deprecated. 

Deprecated method left for backward compatibility.

Parameters:
useConfDataNs - parameter is ignored.

getClientApplicationType

public int getClientApplicationType()
Returns type of the client application as defined in CfgAppType enumeration.

Specified by:
getClientApplicationType in interface ConfServerProtocolHandshakeOptions
Returns:
type of the client application
See Also:
CfgAppType, setClientApplicationType(int)

setClientApplicationType

public void setClientApplicationType(int clientType)
Sets type of the client application as defined in CfgAppType enumeration.

Specified by:
setClientApplicationType in interface ConfServerProtocolHandshakeOptions
Parameters:
clientType - integer representation of type of the client application
See Also:
CfgAppType, CfgAppType.ordinal()

getClientName

public java.lang.String getClientName()
Returns client applications' name.

Specified by:
getClientName in interface ConfServerProtocolHandshakeOptions
Returns:
client application name
See Also:
setClientName(String)

setClientName

public void setClientName(java.lang.String clientName)
Sets client applications' name.

Specified by:
setClientName in interface ConfServerProtocolHandshakeOptions
Parameters:
clientName - client application name

getUserName

public java.lang.String getUserName()
Returns the name of a user in the Genesys Configuration Layer.

Specified by:
getUserName in interface ConfServerProtocolHandshakeOptions
Returns:
the name of a user
See Also:
setUserName(String)

setUserName

public void setUserName(java.lang.String userName)
Sets the name of a user in the Genesys Configuration Layer.

Specified by:
setUserName in interface ConfServerProtocolHandshakeOptions
Parameters:
userName - name of a user

getUserPassword

@Deprecated
public java.lang.String getUserPassword()
Deprecated. The getter behaviour has been changed. Now it returns only empty string or null.

Returns the password of a user in the Genesys Configuration Layer.

Specified by:
getUserPassword in interface ConfServerProtocolHandshakeOptions
Returns:
empty string (if the property has been assigned) or null.
See Also:
setUserPassword(String)

setUserPassword

public void setUserPassword(java.lang.String userPassword)
Sets the password of a user in the Genesys Configuration Layer.

Specified by:
setUserPassword in interface ConfServerProtocolHandshakeOptions
Parameters:
userPassword - the password of a user

getUseForwardCompatibility

@Deprecated
public boolean getUseForwardCompatibility()
Deprecated. The method has been deprecated.

Forward compatibility feature enabling option value getting method. In case the property set to 'true' and Configuration Server supports protocol version newer that ConfServerProtocol's one, ConfServerProtocol read the newer protocol schema from Configuration Server and use it for objects transformation.

Returns:
forward compatibility algorithm allowing flag

setUseForwardCompatibility

@Deprecated
public void setUseForwardCompatibility(boolean value)
Deprecated. The method has been deprecated.

Forward compatibility feature enabling option value setting method. In case the property set to 'true' (default is 'false') and Configuration Server supports protocol version newer that ConfServerProtocol's one, ConfServerProtocol will read the newer protocol schema from Configuration Server and later use it for objects transformation.

Parameters:
value - forward compatibility algorithm allowing flag

getUseDeltaOptimization

@Deprecated
public boolean getUseDeltaOptimization()
Deprecated. The method has been deprecated.

UseDeltaOptimization property sets/gets the delta cleanup processing. Delta cleanup processing removes all delta elements that are present in received from Configuration Server binary-string represented delta object but have an indication that they are not actually bringing any changes.

Returns:
delta optimization usage property value

setUseDeltaOptimization

@Deprecated
public void setUseDeltaOptimization(boolean value)
Deprecated. The method has been deprecated.

UseDeltaOptimization property sets/gets the delta cleanup processing. Delta cleanup processing removes all delta elements that are present in received from Configuration Server binary-string represented delta object but have an indication that they are not actually bringing any changes.

Parameters:
value - new value for delta optimization usage property

getUseSession

public boolean getUseSession()
Gets session usage flag. if it is set to true then the session will be automatically restored and you will receive automatically all changes for registered objects from the time of connection lost to reopen time.

Session Usage.

  1. Enforce session usage.
  2. Open protocol.
  3. Check if session is restored. If it is not, register for notifications.

Notification registration is needed only if the protocol opened without session restored, otherwise notification state is restored on the server side.

Please note, that if session is restored the protocol will issue RequestHistoryLog to server. RequestHistoryLog provides all changes that happened after the last time the protocol was closed. Upon receiving the request server sends all changes (event per change) that happened to any object the protocol was registered to receive notifications on whether explicitly (by registering on notifications) or via restoring session. So, be prepared to receive some updates if you use session restoration.

Specified by:
getUseSession in interface ConfServerProtocolHandshakeOptions
Returns:
true if session is used
See Also:
setUseSession(boolean), getServerContext(), ConfServerContext.getSessionId(), ConfServerContext.isSessionRestored(), ConfServerContext.getLastUpdateId()

setUseSession

public void setUseSession(boolean useSession)
Sets session usage flag. if it is set to true then the session will be automatically restored and you will receive automatically all changes for registered objects from the time of connection lost to reopen time.

Specified by:
setUseSession in interface ConfServerProtocolHandshakeOptions
Parameters:
useSession - whether session is used
See Also:
getServerContext(), ConfServerContext.getSessionId(), ConfServerContext.isSessionRestored(), ConfServerContext.getLastUpdateId()

useLocalization

public boolean useLocalization()
Returns flag for retrieving and adding the information from data resource repository corresponding to the default localization settings.
If this value is set to true, the handshake procedure will use specific configuration server protocol request to retrieve localization information (RequestReadLocale).

Specified by:
useLocalization in interface ConfServerProtocolHandshakeOptions
Returns:
localization information usage flag
See Also:
setUseLocalization(boolean)

setUseLocalization

public void setUseLocalization(boolean value)
Sets flag for retrieving and adding the information from data resource repository corresponding to the default localization settings.
If this value is set to true, the handshake procedure will use specific configuration server protocol request to retrieve localization information (RequestReadLocale).

Localization read request will be sent for server default Language ID.
In case of multiple languages configuration, application should handle localization data explicitly using RequestReadLocale/EventLocaleRead.
To read list of configured Language IDs on a configuration server, it is possible to use RequestGetLocaleSets/EventLocaleSets.

Specified by:
setUseLocalization in interface ConfServerProtocolHandshakeOptions
Parameters:
value - localization information usage flag
Throws:
ChannelNotClosedException - when protocol connection is not closed
See Also:
getServerContext(), ConfServerContext.getMetadata(), CfgDescription.getLocalizedName(), loadLocalization(Integer)

loadLocalization

public CfgMetadata loadLocalization(java.lang.Integer lcId)
                             throws ProtocolException
Requests localization settings from configuration server and initializes protocol meta data with its response.
It uses RequestReadLocale/EventLocaleRead for this.

To read list of configured Localization IDs on a configuration server, it is possible to use RequestGetLocaleSets/EventLocaleSets.

Parameters:
lcId - locale ID. Zero is for server default localization settings, and null is to clear localization values.
Returns:
Configuration meta data instance with referred localization initialized.
Throws:
ProtocolTimeoutException - in case of no server response on localization read request.
ProtocolException - in case of problem with handling of the protocol request.
ChannelNotOpenedException - when protocol connection is not opened.
See Also:
CfgLanguageLCID, getServerContext(), ConfServerContext.getMetadata(), CfgDescription.getLocalizedName()

setTKVPrinter

public void setTKVPrinter(KeyValuePrinter printer)

onOpen

protected void onOpen()
               throws ProtocolException
Description copied from class: DuplexChannel
This method is called when channel is opened and just about to call event handler. You usually will need to add some logic here and call super.onOpen() at the end of your method. Please note, that calling super.onOpen() on the thread other then open() was called will most probably result in deadlock for some scenarios (like calling close() inside of onChannelOpened())

Overrides:
onOpen in class ClientChannel
Throws:
ProtocolException - if there are problems during post open operations (e.g. registration)

onClose

protected void onClose(ConnectionClosedEvent event)
Overrides:
onClose in class DuplexChannel

onReceiveMessage

protected void onReceiveMessage(Message message)
Description copied from class: DuplexChannel
Gives to subclass a chance to perform some operations on incoming message arrival before delivering it to connection user code. We don't use AsyncInvoker here, because the message handling in this class probably doesn't worth it - this method is quick and shouldn't load connection thread too much. But if this method is overridden in some classes and contains some long-running logic, consider using AsyncInvoker

Overrides:
onReceiveMessage in class ClientChannel
Parameters:
message - received message

onSend

protected void onSend(Message message)
               throws ProtocolException
Description copied from class: DuplexChannel
Gives to subclass a chance to modify message before sending it to remote party.

Overrides:
onSend in class ClientChannel
Parameters:
message - Message to modify
Throws:
ProtocolException - 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.

getTicketAcquirer

public AuthTicketAcquirer getTicketAcquirer()
Gets custom Kerberos ticket acquirer.

Returns:
custom Kerberos ticket acquirer.

setTicketAcquirer

public void setTicketAcquirer(AuthTicketAcquirer ticketAcquirer)
Sets custom Kerberos ticket acquirer.

Note: a server principal name will be passed to the custom Kerberos ticket acquirer that will be taken from the protocol endpoint.

Parameters:
ticketAcquirer - custom Kerberos ticket acquirer.

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.