Configuration Platform SDK 7.6 API Reference

com.genesyslab.platform.configuration.protocol
Class ConfServerProtocol

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

public final class ConfServerProtocol
extends ClientChannel


Field Summary
 
Fields inherited from interface com.genesyslab.platform.commons.protocol.Channel
DEFAULT_TIMEOUT, INFINITE_TIMEOUT
 
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver
DEF_INPUT_SIZE
 
Constructor Summary
ConfServerProtocol(Endpoint endpoint)
           
ConfServerProtocol(Endpoint endpoint, boolean initCrypto)
           
ConfServerProtocol(Endpoint endpoint, long timeout, boolean initCrypto)
          Please note that initializing cryptoengine can take some time, so if you are absolutly sure your server doesn't (and won't) support AES encripting set the initCrypt parameter to false.
 
Method Summary
 int getClientApplicationType()
           
 java.lang.String getClientName()
           
 ConfServerClientType getClientType()
          Deprecated.  
 java.lang.String getProtocolVersion()
          Deprecated.  
 void getSchema(javax.xml.transform.Result result)
          Deprecated.  
 ConfServerContext getServerContext()
          ConfServerContext property gets protocol context of Configuration Server ConfServerProtocol opened connection with.
 java.lang.String getServerVersion()
          Deprecated.  
 boolean getUseDeltaOptimization()
          UseDeltaOptimization property sets/gets the delta cleanup processing.
 boolean getUseForwardCompatibility()
          Forward compatibility feature enabling option value getting method.
 java.lang.String getUserName()
           
 java.lang.String getUserPassword()
           
 boolean getUseSession()
          Get session usage.
static void initCrypto()
          Usually initializing of cryptoengine takes a lot of time and can cause timeouts if will be performed during open procedure.
 boolean isSessionRestored()
          Deprecated.  
 void setClientApplicationType(int clientType)
           
 void setClientName(java.lang.String clientName)
           
 void setClientType(ConfServerClientType clientType)
          Deprecated.  
 void setTKVPrinter(com.genesyslab.platform.commons.collections.processor.KeyValuePrinter printer)
           
 void setUseDeltaOptimization(boolean value)
          UseDeltaOptimization property sets/gets the delta cleanup processing.
 void setUseForwardCompatibility(boolean value)
          Forward compatibility feature enabling option value setting method.
 void setUserName(java.lang.String userName)
           
 void setUserPassword(java.lang.String userPasssword)
           
 void setUseSession(boolean useSession)
          Set session usage.
 
Methods inherited from class com.genesyslab.platform.commons.protocol.ClientChannel
beginRequest, endRequest, endRequest, getCopyResponse, getReferenceBuilder, request, request, setCopyResponse
 
Methods inherited from class com.genesyslab.platform.commons.protocol.DuplexChannel
beginClose, beginOpen, clearInput, close, close, getInputSize, getInterceptor, getProtocolDescription, open, open, receive, receive, releaseReceivers, resetReceiver, send, setConnectionInvoker, setInputSize, setReceiver, toString
 
Methods inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel
addChannelListener, configure, getConfiguration, getEndpoint, getState, getTimeout, removeChannelListener, setEndpoint, setInvoker, setTimeout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.Channel
close, close, getTimeout, open, open, setTimeout
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncChannel
beginClose, beginOpen, getState
 
Methods inherited from interface com.genesyslab.platform.commons.protocol.ChannelListenerSupport
addChannelListener, removeChannelListener
 
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
send
 
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, setEndpoint
 
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
 

Constructor Detail

ConfServerProtocol

public ConfServerProtocol(Endpoint endpoint)

ConfServerProtocol

public ConfServerProtocol(Endpoint endpoint,
                          boolean initCrypto)

ConfServerProtocol

public ConfServerProtocol(Endpoint endpoint,
                          long timeout,
                          boolean initCrypto)
Please note that initializing cryptoengine can take some time, so if you are absolutly sure your server doesn't (and won't) support AES encripting 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

getServerContext

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

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 defult this step is performed during construction of the ConfServerProtocol. Use this method if you want to perform it earlier.


getClientType

public ConfServerClientType getClientType()
Deprecated.  

Returns:
client type
See Also:
getClientApplicationType()

setClientType

public void setClientType(ConfServerClientType clientType)
Deprecated.  

Parameters:
clientType - client type
See Also:
setClientApplicationType(int)

getClientApplicationType

public int getClientApplicationType()

setClientApplicationType

public void setClientApplicationType(int clientType)

getClientName

public java.lang.String getClientName()

setClientName

public void setClientName(java.lang.String clientName)

getUserName

public java.lang.String getUserName()

setUserName

public void setUserName(java.lang.String userName)

getUserPassword

public java.lang.String getUserPassword()

setUserPassword

public void setUserPassword(java.lang.String userPasssword)

getProtocolVersion

public java.lang.String getProtocolVersion()
Deprecated.  

ProtocolVersion property provides Protocol Version that is used for communication with Configuration Server.

Returns:
protocol version
See Also:
getServerContext(), ConfServerContext.getProtocolVersion()

getUseForwardCompatibility

public boolean getUseForwardCompatibility()
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
See Also:
setUseForwardCompatibility(boolean)

setUseForwardCompatibility

public void setUseForwardCompatibility(boolean value)
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

public boolean getUseDeltaOptimization()
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 propety value

setUseDeltaOptimization

public void setUseDeltaOptimization(boolean value)
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 propety

getUseSession

public boolean getUseSession()
Get session usage. Session usage is enforced when it is set to true.

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 happend after the last time the protocol was closed. Upon receiving the request server sends all changes (event per change) that happended to any object the protocol was registered to receive notifications on whethere explicitely (by registering on notifications) or via restoring session. So, be prepared to receive some updates if you use session restoration.

Returns:
true if session is used
See Also:
getServerContext(), ConfServerContext.isSessionRestored()

setUseSession

public void setUseSession(boolean useSession)
Set session usage. Session usage is enforced when it is set to true.

Parameters:
useSession - whether session is used
See Also:
getUseSession()

isSessionRestored

public boolean isSessionRestored()
Deprecated.  

IsSessionRestored property indicates if session is restored. Always false if the protocol is closed. Always false if session usage is not enforced.

Returns:
true is session is restored
See Also:
getServerContext(), ConfServerContext.isSessionRestored(), getUseSession()

setTKVPrinter

public void setTKVPrinter(com.genesyslab.platform.commons.collections.processor.KeyValuePrinter printer)

getServerVersion

public java.lang.String getServerVersion()
Deprecated.  

Configuration server the protocol is connected to. Do not confuse with getProtocolVersion().

Returns:
server version
See Also:
getServerContext(), ConfServerContext.getServerVersion()

getSchema

public void getSchema(javax.xml.transform.Result result)
               throws javax.xml.transform.TransformerException
Deprecated.  

Generate configuration protocol schema.

Parameters:
result - transformation result document to generate schema into
Throws:
javax.xml.transform.TransformerException - document generation error
See Also:
getServerContext(), ConfServerContext.getSchema(javax.xml.transform.Result)

Configuration Platform SDK 7.6 API Reference

Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.