com.ibm.dse.cs.servlet
Class CSClient

java.lang.Object
  |
  +--com.ibm.dse.base.DSENotifier
        |
        +--com.ibm.dse.base.Service
              |
              +--com.ibm.dse.cs.servlet.CSClient

public class CSClient
extends Service
implements CSAsynchronousReplyListener, CSClientService

The CSClient class provides the C/S service on the client side.

See Also:
Serialized Form

Field Summary
protected  CSNotificationListener aCSNotificationListener
          Contains the listeners of the CSNotificationEvent events.
protected  CSReplyListener aCSReplyListener
          Contains the listeners of the CSReplyEvent events.
protected  CSSessionStatusChangedListener aCSSessionStatusChangedListener
          Contains the listeners of the CSSessionStatusChangedEvent events.
protected  HttpURLConnectionThin csAssignConnection
          Connection used to establish session with the server.
protected  java.lang.String csAssignServletName
          Name of the servlet used to establish session with the server.
protected  HttpURLConnectionThin csNotifClToSrvConnection
          Connection used to send events to the server.
protected  java.lang.String csNotifClToSrvServletName
          Name of the servlet used to send events to the server.
protected  HttpURLConnectionThin csNotifSrvToClConnection
          Connection used to receive events from the server.
protected  java.lang.String csNotifSrvToClServletName
          Name of the servlet used to receive events from the server.
protected  HttpURLConnectionThin csReqProtocolConnection
          Connection used to execute operation in the server side.
protected  java.lang.String csReqProtocolServletName
          Name of the servlet used to connect to the server for executing operations.
protected  boolean isCsNotifClToSrvConnectionFree
          Specifies if the connection csNotifClToSrvConnection can be used.
protected  boolean isCsReqProtocolConnectionFree
          Specifies if the connection csReqProtocolConnection can be used.
protected  int ReconnectionAttemptsForSMNotification
          Number of attempts to reestablish the session.
protected  boolean retryOnError
          Specifies if the Client/Server must try to send a request when there has been communication problems.
protected  Hashtable terminateThreads
          List of threads that must be stopped when csclient terminates.
protected  long TimeBetweenReconnectionAttempts
          Time between reconnection attempts when the session is down.
 
Fields inherited from class com.ibm.dse.base.Service
externalizer
 
Fields inherited from class com.ibm.dse.base.DSENotifier
handlersList, name
 
Fields inherited from interface com.ibm.dse.clientserver.CSClientService
CS_REPLY_EVENT, CS_REQUEST_ID, CS_SESSION_STATUS, CS_STATUS_CHANGED_EVENT, DOWN, NonSecure, NOT_ESTABLISHED, OK, RESET, SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_WITH_DES_CBC_SHA, SSL_RSA_WITH_NULL_MD5, SSL_RSA_WITH_NULL_SHA
 
Constructor Summary
CSClient()
          This constructor creates a CSClient object.
CSClient(java.lang.String aName)
          This constructor creates a CSClient object.
 
Method Summary
 void addCSNotificationListener(CSNotificationListener newListener)
          Adds the specified CSNotificationListener to recieve CSNotificationEvents from this class.
 void addCSReplyListener(CSReplyListener newListener)
          Adds the specified CSReplyListener to recieve CSReplyEvents from this class.
 void addCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
          Adds the specified CSSessionStatusChangedListener to recieve CSSessionStatusChangedEvents from this class.
 void closeSession()
          Closes the session.
 void establishSession()
          Establishes a session with the server.
 void establishSession(boolean newSession)
          Establishes a session with the server.
 void finalize()
          Called by the garbage collector.
protected  void fireAndSignalCSReplyEvent(CSReplyEvent anEvent, java.lang.String eventName)
          Method to support listener events.
protected  void fireAndSignalCSStatusChangedEvent(CSSessionStatusChangedEvent anEvent, java.lang.String eventName)
          Method to support listener events.
protected  void fireHandleCSNotificationEvent(CSNotificationEvent event)
          Method to support listener events.
protected  void fireHandleCSReplyEvent(CSReplyEvent event)
          Method to support listener events.
protected  void fireHandleCSSessionStatusChangedEvent(CSSessionStatusChangedEvent event)
          Method to support listener events.
protected  boolean firstDown()
          Returns true if the sesion is not down yet.
protected  void freeCsNotifClToSrvConnection(HttpURLConnectionThin aHttpURLConnectionThin)
          Allows to use the CsNotifClToSrvConnection again.
protected  void freeCsReqProtocolConnection(HttpURLConnectionThin aHttpURLConnectionThin)
          Allows to use the CsReqProtocolConnection again.
 boolean getCreateSession()
          Gets the fieldCreateSession property (boolean) value.
protected  HttpURLConnectionThin getCsAssignConnection()
          Returns a connection used to establish a session with the server.
 java.lang.String getCsAssignServletName()
          Gets the csAssignServletName value.
protected  HttpURLConnectionThin getCsNotifClToSrvConnection()
          Returns a connection used to send events to the server.
 java.lang.String getCsNotifClToSrvServletName()
          Gets the csNotifClToSrvServletName value.
protected  HttpURLConnectionThin getCsNotifSrvToClConnection()
          Returns a connection used to receive events from the server.
 java.lang.String getCsNotifSrvToClServletName()
          Gets the csNotifSrvToClServletName value.
protected  HttpURLConnectionThin getCsReqProtocolConnection()
          Returns a connection used to execute operation in the server side.
 java.lang.String getCsReqProtocolServletName()
          Gets the csReqProtocolServletName value.
 long getDefaultOperationTimeout()
          Returns the timeout used in the methods: sendAndWait(ClientOperation), receive(ClientOperation, Integer), receive (Context, Integer)
protected static java.lang.Integer getIdRequest()
          Gets the _idRequestCounter property (Integer) value.
 boolean getKeepAliveConnection()
          Gets the keepAliveConnection property (boolean) value.
 java.lang.String getKeyRingClass()
          Returns the package and class name of the class that contains the certificate.
protected  HttpURLConnectionThin getNewCsNotifClToSrvConnection()
          Returns a connection used to send events to the server.
protected  HttpURLConnectionThin getNewCsReqProtocolConnection()
          Returns a connection used to execute operation in the server side.
 java.lang.String getProxyCredentials()
          Gets the proxyCredentials property (java.lang.String) value.
 java.lang.String getProxyHost()
          Gets the proxyHost property (java.lang.String) value.
 int getProxyPort()
          Gets the proxyPort property (int) value.
 int getReconnectionAttempts()
          Gets the ReconnectionAttemptsForSMNotification property (int) value.
 boolean getRunInSession()
          Returns the field runInSession, wich indicates whether the application must run under session management or not.
protected  SendEventsBuffer getSendEventsBuffer()
          Gets the _sendEventsBuffer property (com.ibm.dse.clientserver.SendEventsBuffer) value.
 java.lang.String getServerCredentials()
          Gets the serverCredentials property (java.lang.String) value.
protected  java.lang.Long getServerId()
          Gets the serverId property (java.lang.Long) value.
 java.lang.String getServerName()
          Gets the _serverName property (java.lang.String) value.
 java.lang.String getServerTID()
          Gets the _serverTID property (java.lang.String) value.
protected  java.lang.String getServiceId()
          Gets the _serviceId property (java.lang.String) value.
 java.lang.String getSessionId()
          Gets the _serviceId property (java.lang.String) value.
 int getSessionStatus()
          Gets the _sessionStatus property (int) value.
 int getSessionType()
          Gets the _sessionType property (int) value.
protected  java.lang.String getStringSessionType()
          Gets a String describing the session type.
 long getTimeBetweenReconnectionAttempts()
          Gets the TimeBetweenReconnectionAttempts property (long) value.
protected  long getTimeout()
          Gets the timeout property (long) value.
 boolean getUseCookie()
          Get the fieldUseCookie property value
 boolean getUsedForSrvToClEventsNotif()
          Gets the _usedForSrvToClEventNotif property (boolean) value.
 boolean getUseProxy()
          Gets the useProxy property (boolean) value.
 java.lang.String getUserAgent()
          Gets the fieldUserAgent property (java.lang.String) value.
 void handleCSAsynchronousReplyEvent(CSAsynchronousReplyEvent event)
          Contains the appropriate actions to be executed when CSAsynchronousReplyEvent has been triggered.
 java.lang.Object initializeFrom(Tag aTag)
          Sets all attributes that are defined in dse.ini file.
 boolean isRetryOnError()
          Gets the retryOnError property (boolean) value.
protected  void manageCaseConnectionDown(java.lang.String who)
          Tries to establish the session with the server when the sesion goes down.
 void receive(ClientOperation aClientOperation, java.lang.Integer requestId)
          Used together with the asynchronous send(...) method.
 void receive(ClientOperation aClientOperation, java.lang.Integer requestId, long timeout)
          Used together with the asynchronous send(...) method.
 void receive(Context aContext, java.lang.Integer requestId)
          Used together with the asynchronous send(...) method.
 void receive(Context aContext, java.lang.Integer requestId, long timeout)
          Used together with the asynchronous send(...) method.
 void removeCSNotificationListener(CSNotificationListener newListener)
          Removes the specified CSNotificationListener so that it no longer receives CSNotificationEvents from this class.
 void removeCSReplyListener(CSReplyListener newListener)
          Removes the specified CSReplyListener so that it no longer receives CSReplyEvents from this class.
 void removeCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
          Removes the specified CSSessionStatusChangedListener so that it no longer receives CSSessionStatusChangedEvents from this class.
 java.lang.Integer send(ClientOperation aClientOperation)
          Instantiates the remote execution of the operation on the server side.
 void sendAndWait(ClientOperation aClientOperation)
          Initiates the remote execution of the operation on the server side and waits.
 void sendAndWait(ClientOperation aClientOperation, long timeout)
          Initiates the remote execution of the operation on the server side and waits for a timeout.
 void sendEvent(java.util.EventObject myEvent)
          Sends an event to the server.
 void setCreateSession(boolean value)
          Sets the fieldCreateSession property (boolean) value.
protected  void setCsAssignConnection(HttpURLConnectionThin aCsAssignConnection)
          Sets the csAssignConnection property (com.ibm.dse.clientserver.servlet.HttpURLConnectionThin) value.
 void setCsAssignServletName(java.lang.String newCsAssignServletName)
          Sets the csAssignServletName value.
protected  void setCsNotifClToSrvConnection(HttpURLConnectionThin aCsNotifClToSrvConnection)
          Sets the csNotifClToSrvConnection property (com.ibm.dse.clientserver.servlet.HttpURLConnectionThin) value.
 void setCsNotifClToSrvServletName(java.lang.String newCsNotifClToSrvServletName)
          Sets the csNotifClToSrvServletName value.
protected  void setCsNotifSrvToClConnection(HttpURLConnectionThin aCsNotifSrvToClConnection)
          Sets the csNotifSrvToClConnection property (com.ibm.dse.clientserver.servlet.HttpURLConnectionThin) value.
 void setCsNotifSrvToClServletName(java.lang.String newCsNotifSrvToClServletName)
          Sets the csNotifSrvToClServletName value.
protected  void setCsReqProtocolConnection(HttpURLConnectionThin aCsReqProtocolConnection)
          Sets the csReqProtocolConnection property (com.ibm.dse.clientserver.servlet.HttpURLConnectionThin) value.
 void setCsReqProtocolServletName(java.lang.String newCsReqProtocolServletName)
          Sets the csReqProtocolServletName value.
 void setDefaultOperationTimeout(long aTimeout)
          Sets the defaultOperationTimeout property (long) value.
 void setKeepAliveConnection(boolean value)
          Sets the keepAliveConnection property (boolean) value.
 void setKeyRingClass(java.lang.String aKeyRingClass)
          Sets the keyRingClass property (java.lang.String) value.
 void setProxyCredentials(java.lang.String aProxyCredentials)
          Sets the proxyCredentials property (String) value.
 void setProxyHost(java.lang.String value)
          Sets the proxyHost property (String) value.
 void setProxyPort(int value)
          Sets the proxyPort property (int) value.
 void setReconnectionAttempts(int value)
          Sets the ReconnectionAttemptsForSMNotification property (int) value.
 void setRetryOnError(boolean newRetryOnError)
          Sets the retryOnError property (boolean) value.
 void setRunInSession(boolean newRunInSession)
          Sets the runInSession property (boolean) value.
 void setServerCredentials(java.lang.String aServerCredentials)
          Sets the serverCredentials property (String) value.
protected  void setServerId(java.lang.Long aServerId)
          Sets the serverId property (Long) value.
 void setServerName(java.lang.String serverName)
          Sets the _serverName property (java.lang.String) value.
 void setSessionType(java.lang.String sessionType)
          Sets the _sessionType property (java.lang.String) value.
 void setTimeBetweenReconnectionAttempts(long value)
          Sets the TimeBetweenReconnectionAttempts property (long) value.
protected  void setTimeout(long aTimeout)
          Sets the timeout property (long) value.
 void setUsedForSrvToClEventNotif(boolean used)
          Sets the _usedForSrvToClEventNotif property (boolean) value.
 void setUseProxy(boolean value)
          Sets the useProxy property (boolean) value.
 void setUserAgent(java.lang.String userAgent)
          Sets the fieldUserAgent property (java.lang.String) value.
 void terminate()
          This is called either from the application or from the context when it is destroyed or unchained.
 java.lang.String toString()
          Returns an SGML representation.
 
Methods inherited from class com.ibm.dse.base.Service
externalizer, getExternalizer, getTagName, readExternal, readExternal, readObject, removeExternal, setExternalizer, toStrings, toTags, writeExternal, writeExternal
 
Methods inherited from class com.ibm.dse.base.DSENotifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TimeBetweenReconnectionAttempts

protected long TimeBetweenReconnectionAttempts
Time between reconnection attempts when the session is down.

ReconnectionAttemptsForSMNotification

protected int ReconnectionAttemptsForSMNotification
Number of attempts to reestablish the session.

aCSNotificationListener

protected transient CSNotificationListener aCSNotificationListener
Contains the listeners of the CSNotificationEvent events.

aCSReplyListener

protected transient CSReplyListener aCSReplyListener
Contains the listeners of the CSReplyEvent events.

aCSSessionStatusChangedListener

protected transient CSSessionStatusChangedListener aCSSessionStatusChangedListener
Contains the listeners of the CSSessionStatusChangedEvent events.

csReqProtocolConnection

protected HttpURLConnectionThin csReqProtocolConnection
Connection used to execute operation in the server side.

csReqProtocolServletName

protected java.lang.String csReqProtocolServletName
Name of the servlet used to connect to the server for executing operations. By default is the name of the class.

csAssignConnection

protected HttpURLConnectionThin csAssignConnection
Connection used to establish session with the server.

csAssignServletName

protected java.lang.String csAssignServletName
Name of the servlet used to establish session with the server. By default is the name of the class.

csNotifClToSrvConnection

protected HttpURLConnectionThin csNotifClToSrvConnection
Connection used to send events to the server.

csNotifClToSrvServletName

protected java.lang.String csNotifClToSrvServletName
Name of the servlet used to send events to the server. By default is the name of the class.

csNotifSrvToClConnection

protected HttpURLConnectionThin csNotifSrvToClConnection
Connection used to receive events from the server.

csNotifSrvToClServletName

protected java.lang.String csNotifSrvToClServletName
Name of the servlet used to receive events from the server. By default is the name of the class.

terminateThreads

protected Hashtable terminateThreads
List of threads that must be stopped when csclient terminates.

isCsReqProtocolConnectionFree

protected boolean isCsReqProtocolConnectionFree
Specifies if the connection csReqProtocolConnection can be used.

isCsNotifClToSrvConnectionFree

protected boolean isCsNotifClToSrvConnectionFree
Specifies if the connection csNotifClToSrvConnection can be used.

retryOnError

protected boolean retryOnError
Specifies if the Client/Server must try to send a request when there has been communication problems. By default is true (initializeFrom).
Constructor Detail

CSClient

public CSClient()
This constructor creates a CSClient object.

CSClient

public CSClient(java.lang.String aName)
This constructor creates a CSClient object. Gets the field's values from the Settings.
Parameters:
aName - java.lang.String
Method Detail

addCSNotificationListener

public void addCSNotificationListener(CSNotificationListener newListener)
Adds the specified CSNotificationListener to recieve CSNotificationEvents from this class.
Specified by:
addCSNotificationListener in interface CSClientService
Parameters:
newListener - com.ibm.dse.clientserver.CSNotificationListener

addCSReplyListener

public void addCSReplyListener(CSReplyListener newListener)
Adds the specified CSReplyListener to recieve CSReplyEvents from this class.
Specified by:
addCSReplyListener in interface CSClientService
Parameters:
newListener - com.ibm.dse.clientserver.CSReplyListener

addCSSessionStatusChangedListener

public void addCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
Adds the specified CSSessionStatusChangedListener to recieve CSSessionStatusChangedEvents from this class.
Specified by:
addCSSessionStatusChangedListener in interface CSClientService
Parameters:
newListener - com.ibm.dse.clientserver.CSSessionStatusChangedListener

closeSession

public void closeSession()
                  throws DSECSInvalidRequestException
Closes the session.
Specified by:
closeSession in interface CSClientService

establishSession

public void establishSession()
                      throws DSECSInvalidRequestException,
                             DSECSSessionNotEstablishedException
Establishes a session with the server.
Specified by:
establishSession in interface CSClientService

establishSession

public void establishSession(boolean newSession)
                      throws DSECSInvalidRequestException,
                             DSECSSessionNotEstablishedException
Establishes a session with the server. The boolean value is used to determine if the request is to establish a new or existing session
Specified by:
establishSession in interface CSClientService
Parameters:
newSession - boolean

finalize

public void finalize()
Called by the garbage collector.
Overrides:
finalize in class java.lang.Object

fireAndSignalCSReplyEvent

protected void fireAndSignalCSReplyEvent(CSReplyEvent anEvent,
                                         java.lang.String eventName)
Method to support listener events.
Parameters:
anEvent - com.ibm.dse.clientserver.CSReplyEvent
eventName - java.lang.String

fireAndSignalCSStatusChangedEvent

protected void fireAndSignalCSStatusChangedEvent(CSSessionStatusChangedEvent anEvent,
                                                 java.lang.String eventName)
Method to support listener events.
Parameters:
anEvent - com.ibm.dse.clientserver.CSReplyEvent
eventName - java.lang.String

fireHandleCSNotificationEvent

protected void fireHandleCSNotificationEvent(CSNotificationEvent event)
Method to support listener events.
Parameters:
event - com.ibm.dse.clientserver.CSNotificationEvent

fireHandleCSReplyEvent

protected void fireHandleCSReplyEvent(CSReplyEvent event)
Method to support listener events.
Parameters:
event - com.ibm.dse.clientserver.CSReplyEvent

fireHandleCSSessionStatusChangedEvent

protected void fireHandleCSSessionStatusChangedEvent(CSSessionStatusChangedEvent event)
Method to support listener events.
Parameters:
event - com.ibm.dse.clientserver.CSSessionStatusChangedEvent

firstDown

protected boolean firstDown()
Returns true if the sesion is not down yet.
Returns:
boolean

freeCsNotifClToSrvConnection

protected void freeCsNotifClToSrvConnection(HttpURLConnectionThin aHttpURLConnectionThin)
Allows to use the CsNotifClToSrvConnection again.
Parameters:
aHttpURLConnectionThin - com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

freeCsReqProtocolConnection

protected void freeCsReqProtocolConnection(HttpURLConnectionThin aHttpURLConnectionThin)
Allows to use the CsReqProtocolConnection again.
Parameters:
aHttpURLConnectionThin - com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

getCreateSession

public boolean getCreateSession()
Gets the fieldCreateSession property (boolean) value.
Returns:
boolean

getCsAssignConnection

protected HttpURLConnectionThin getCsAssignConnection()
                                               throws java.lang.Exception
Returns a connection used to establish a session with the server.
Returns:
com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

getCsAssignServletName

public java.lang.String getCsAssignServletName()
Gets the csAssignServletName value.
Returns:
java.lang.String

getCsNotifClToSrvConnection

protected HttpURLConnectionThin getCsNotifClToSrvConnection()
                                                     throws java.lang.Exception
Returns a connection used to send events to the server.
Returns:
com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

getCsNotifClToSrvServletName

public java.lang.String getCsNotifClToSrvServletName()
Gets the csNotifClToSrvServletName value.
Returns:
java.lang.String

getCsNotifSrvToClConnection

protected HttpURLConnectionThin getCsNotifSrvToClConnection()
                                                     throws java.lang.Exception
Returns a connection used to receive events from the server.
Returns:
com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

getCsNotifSrvToClServletName

public java.lang.String getCsNotifSrvToClServletName()
Gets the csNotifSrvToClServletName value.
Returns:
java.lang.String

getCsReqProtocolConnection

protected HttpURLConnectionThin getCsReqProtocolConnection()
                                                    throws java.lang.Exception
Returns a connection used to execute operation in the server side.
Returns:
com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

getCsReqProtocolServletName

public java.lang.String getCsReqProtocolServletName()
Gets the csReqProtocolServletName value.
Returns:
java.lang.String

getDefaultOperationTimeout

public long getDefaultOperationTimeout()
Returns the timeout used in the methods: sendAndWait(ClientOperation), receive(ClientOperation, Integer), receive (Context, Integer)
Specified by:
getDefaultOperationTimeout in interface CSClientService
Returns:
long

getIdRequest

protected static java.lang.Integer getIdRequest()
Gets the _idRequestCounter property (Integer) value.
Returns:
Integer

getKeepAliveConnection

public boolean getKeepAliveConnection()
Gets the keepAliveConnection property (boolean) value.
Specified by:
getKeepAliveConnection in interface CSClientService
Returns:
boolean

getKeyRingClass

public java.lang.String getKeyRingClass()
Returns the package and class name of the class that contains the certificate.
Specified by:
getKeyRingClass in interface CSClientService
Returns:
java.lang.String

getNewCsNotifClToSrvConnection

protected HttpURLConnectionThin getNewCsNotifClToSrvConnection()
                                                        throws java.lang.Exception
Returns a connection used to send events to the server.
Returns:
com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

getNewCsReqProtocolConnection

protected HttpURLConnectionThin getNewCsReqProtocolConnection()
                                                       throws java.lang.Exception
Returns a connection used to execute operation in the server side.
Returns:
com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

getProxyCredentials

public java.lang.String getProxyCredentials()
Gets the proxyCredentials property (java.lang.String) value.
Specified by:
getProxyCredentials in interface CSClientService
Returns:
java.lang.String

getProxyHost

public java.lang.String getProxyHost()
Gets the proxyHost property (java.lang.String) value.
Specified by:
getProxyHost in interface CSClientService
Returns:
java.lang.String

getProxyPort

public int getProxyPort()
Gets the proxyPort property (int) value.
Specified by:
getProxyPort in interface CSClientService
Returns:
int

getReconnectionAttempts

public int getReconnectionAttempts()
Gets the ReconnectionAttemptsForSMNotification property (int) value.
Specified by:
getReconnectionAttempts in interface CSClientService
Returns:
int

getRunInSession

public boolean getRunInSession()
Returns the field runInSession, wich indicates whether the application must run under session management or not.
Returns:
boolean

getSendEventsBuffer

protected SendEventsBuffer getSendEventsBuffer()
Gets the _sendEventsBuffer property (com.ibm.dse.clientserver.SendEventsBuffer) value.
Returns:
com.ibm.dse.clientserver.SendEventsBuffer

getServerCredentials

public java.lang.String getServerCredentials()
Gets the serverCredentials property (java.lang.String) value.
Specified by:
getServerCredentials in interface CSClientService
Returns:
java.lang.String

getServerId

protected java.lang.Long getServerId()
Gets the serverId property (java.lang.Long) value.
Returns:
java.lang.Long

getServerName

public java.lang.String getServerName()
Gets the _serverName property (java.lang.String) value.
Specified by:
getServerName in interface CSClientService
Returns:
java.lang.String

getServerTID

public java.lang.String getServerTID()
Gets the _serverTID property (java.lang.String) value.
Specified by:
getServerTID in interface CSClientService
Returns:
java.lang.String

getServiceId

protected java.lang.String getServiceId()
Gets the _serviceId property (java.lang.String) value.
Returns:
java.lang.String

getSessionId

public java.lang.String getSessionId()
Gets the _serviceId property (java.lang.String) value.
Specified by:
getSessionId in interface CSClientService
Returns:
java.lang.String

getSessionStatus

public int getSessionStatus()
Gets the _sessionStatus property (int) value.
Specified by:
getSessionStatus in interface CSClientService
Returns:
int

getSessionType

public int getSessionType()
Gets the _sessionType property (int) value.
Specified by:
getSessionType in interface CSClientService
Returns:
int

getStringSessionType

protected java.lang.String getStringSessionType()
Gets a String describing the session type.
Returns:
java.lang.String

getTimeBetweenReconnectionAttempts

public long getTimeBetweenReconnectionAttempts()
Gets the TimeBetweenReconnectionAttempts property (long) value.
Specified by:
getTimeBetweenReconnectionAttempts in interface CSClientService
Returns:
long

getTimeout

protected long getTimeout()
Gets the timeout property (long) value.
Returns:
long

getUseCookie

public boolean getUseCookie()
Get the fieldUseCookie property value
Returns:
boolean

getUsedForSrvToClEventsNotif

public boolean getUsedForSrvToClEventsNotif()
Gets the _usedForSrvToClEventNotif property (boolean) value.
Specified by:
getUsedForSrvToClEventsNotif in interface CSClientService
Returns:
boolean

getUseProxy

public boolean getUseProxy()
Gets the useProxy property (boolean) value.
Specified by:
getUseProxy in interface CSClientService
Returns:
boolean

getUserAgent

public java.lang.String getUserAgent()
Gets the fieldUserAgent property (java.lang.String) value.
Returns:
java.lang.String

handleCSAsynchronousReplyEvent

public void handleCSAsynchronousReplyEvent(CSAsynchronousReplyEvent event)
Contains the appropriate actions to be executed when CSAsynchronousReplyEvent has been triggered.
Specified by:
handleCSAsynchronousReplyEvent in interface CSAsynchronousReplyListener
Parameters:
event - com.ibm.dse.clientserver.CSAsynchronousReplyEvent

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
Sets all attributes that are defined in dse.ini file.
Overrides:
initializeFrom in class Service
Parameters:
aTag - com.ibm.dse.base.Tag
Returns:
java.lang.Object

isRetryOnError

public boolean isRetryOnError()
Gets the retryOnError property (boolean) value.
Returns:
boolean

manageCaseConnectionDown

protected void manageCaseConnectionDown(java.lang.String who)
Tries to establish the session with the server when the sesion goes down.
Parameters:
String -  

receive

public void receive(ClientOperation aClientOperation,
                    java.lang.Integer requestId)
             throws DSECSInvalidRequestException,
                    DSECSTimeoutException,
                    DSECSRemoteOperationException
Used together with the asynchronous send(...) method. The RequestId identifies which request owns the answer. The timeout of this method must be specified in the defaultOperationTimeout property
Specified by:
receive in interface CSClientService
Parameters:
aClientOperation - ClientOperation
requesId - java.lang.Integer

receive

public void receive(ClientOperation aClientOperation,
                    java.lang.Integer requestId,
                    long timeout)
             throws DSECSInvalidRequestException,
                    DSECSTimeoutException,
                    DSECSRemoteOperationException
Used together with the asynchronous send(...) method. The RequestId identifies which request owns the answer. The Timeout must be specified in milliseconds. A value equal to zero means to wait forever.
Specified by:
receive in interface CSClientService
Parameters:
aClientOperation - ClientOperation
requesId - java.lang.Integer
timeout - long

receive

public void receive(Context aContext,
                    java.lang.Integer requestId)
             throws DSECSInvalidRequestException,
                    DSECSTimeoutException,
                    DSECSRemoteOperationException
Used together with the asynchronous send(...) method. The RequestId identifies which request owns the answer. The timeout of this method must be specified in the defaultOperationTimeout property
Specified by:
receive in interface CSClientService
Parameters:
aContext - Context
requesId - java.lang.Integer

receive

public void receive(Context aContext,
                    java.lang.Integer requestId,
                    long timeout)
             throws DSECSInvalidRequestException,
                    DSECSTimeoutException,
                    DSECSRemoteOperationException
Used together with the asynchronous send(...) method. The RequestId identifies which request owns the answer. The Timeout must be specified in milliseconds. A value equal to zero means to wait forever.
Specified by:
receive in interface CSClientService
Parameters:
aContext - Context
requesId - java.lang.Integer
timeout - long

removeCSNotificationListener

public void removeCSNotificationListener(CSNotificationListener newListener)
Removes the specified CSNotificationListener so that it no longer receives CSNotificationEvents from this class.
Specified by:
removeCSNotificationListener in interface CSClientService
Parameters:
newListener - com.ibm.dse.clientserver.CSNotificationListener

removeCSReplyListener

public void removeCSReplyListener(CSReplyListener newListener)
Removes the specified CSReplyListener so that it no longer receives CSReplyEvents from this class.
Specified by:
removeCSReplyListener in interface CSClientService
Parameters:
newListener - com.ibm.dse.clientserver.CSReplyListener

removeCSSessionStatusChangedListener

public void removeCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
Removes the specified CSSessionStatusChangedListener so that it no longer receives CSSessionStatusChangedEvents from this class.
Specified by:
removeCSSessionStatusChangedListener in interface CSClientService
Parameters:
newListener - com.ibm.dse.clientserver.CSSessionStatusChangedListener

send

public java.lang.Integer send(ClientOperation aClientOperation)
                       throws DSECSInvalidRequestException
Instantiates the remote execution of the operation on the server side. It is an asynchcronous method.
Specified by:
send in interface CSClientService
Parameters:
aClientOperation - ClientOperation
Returns:
Integer

sendAndWait

public void sendAndWait(ClientOperation aClientOperation)
                 throws DSECSTimeoutException,
                        DSECSInvalidRequestException,
                        DSECSRemoteOperationException
Initiates the remote execution of the operation on the server side and waits. It is a synchronous method. The timeout of this method must be specified in the defaultOperationTimeout property
Specified by:
sendAndWait in interface CSClientService
Parameters:
aClientOperation - ClientOperation

sendAndWait

public void sendAndWait(ClientOperation aClientOperation,
                        long timeout)
                 throws DSECSTimeoutException,
                        DSECSInvalidRequestException,
                        DSECSRemoteOperationException
Initiates the remote execution of the operation on the server side and waits for a timeout. It is a synchronous method. The timeout must be specified in milliseconds. A value equal to zero means it will wait forever.
Specified by:
sendAndWait in interface CSClientService
Parameters:
aClientOperation - ClientOperation
timeout - long

sendEvent

public void sendEvent(java.util.EventObject myEvent)
               throws DSECSInvalidRequestException
Sends an event to the server.
Specified by:
sendEvent in interface CSClientService
Parameters:
evt - EventObject

setCreateSession

public void setCreateSession(boolean value)
Sets the fieldCreateSession property (boolean) value.
Parameters:
boolean -  

setCsAssignConnection

protected void setCsAssignConnection(HttpURLConnectionThin aCsAssignConnection)
Sets the csAssignConnection property (com.ibm.dse.clientserver.servlet.HttpURLConnectionThin) value.
Parameters:
aCsAssignConnection - com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

setCsAssignServletName

public void setCsAssignServletName(java.lang.String newCsAssignServletName)
Sets the csAssignServletName value.
Parameters:
newCsAssignServletName - java.lang.String

setCsNotifClToSrvConnection

protected void setCsNotifClToSrvConnection(HttpURLConnectionThin aCsNotifClToSrvConnection)
Sets the csNotifClToSrvConnection property (com.ibm.dse.clientserver.servlet.HttpURLConnectionThin) value.
Parameters:
aCsNotifClToSrvConnection - com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

setCsNotifClToSrvServletName

public void setCsNotifClToSrvServletName(java.lang.String newCsNotifClToSrvServletName)
Sets the csNotifClToSrvServletName value.
Parameters:
newCsNotifClToSrvServletName - java.lang.String

setCsNotifSrvToClConnection

protected void setCsNotifSrvToClConnection(HttpURLConnectionThin aCsNotifSrvToClConnection)
Sets the csNotifSrvToClConnection property (com.ibm.dse.clientserver.servlet.HttpURLConnectionThin) value.
Parameters:
aCsNotifSrvToClConnection - com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

setCsNotifSrvToClServletName

public void setCsNotifSrvToClServletName(java.lang.String newCsNotifSrvToClServletName)
Sets the csNotifSrvToClServletName value.
Parameters:
newCsNotifSrvToClServletName - java.lang.String

setCsReqProtocolConnection

protected void setCsReqProtocolConnection(HttpURLConnectionThin aCsReqProtocolConnection)
Sets the csReqProtocolConnection property (com.ibm.dse.clientserver.servlet.HttpURLConnectionThin) value.
Parameters:
aCsReqProtocolConnection - com.ibm.dse.clientserver.servlet.HttpURLConnectionThin

setCsReqProtocolServletName

public void setCsReqProtocolServletName(java.lang.String newCsReqProtocolServletName)
Sets the csReqProtocolServletName value.
Parameters:
newCsReqProtocolServletName - java.lang.String

setDefaultOperationTimeout

public void setDefaultOperationTimeout(long aTimeout)
Sets the defaultOperationTimeout property (long) value. This timeout is used in the methods: sendAndWait(ClientOperation), receive(ClientOperation, Integer), receive (Context, Integer)
Specified by:
setDefaultOperationTimeout in interface CSClientService
Parameters:
aTimeout - long

setKeepAliveConnection

public void setKeepAliveConnection(boolean value)
Sets the keepAliveConnection property (boolean) value.
Specified by:
setKeepAliveConnection in interface CSClientService
Parameters:
value - boolean

setKeyRingClass

public void setKeyRingClass(java.lang.String aKeyRingClass)
Sets the keyRingClass property (java.lang.String) value.
Specified by:
setKeyRingClass in interface CSClientService
Parameters:
aKeyRingClass - java.lang.String

setProxyCredentials

public void setProxyCredentials(java.lang.String aProxyCredentials)
Sets the proxyCredentials property (String) value.
Specified by:
setProxyCredentials in interface CSClientService
Parameters:
aProxyCredentials - String

setProxyHost

public void setProxyHost(java.lang.String value)
Sets the proxyHost property (String) value.
Specified by:
setProxyHost in interface CSClientService
Parameters:
value - String

setProxyPort

public void setProxyPort(int value)
Sets the proxyPort property (int) value.
Specified by:
setProxyPort in interface CSClientService
Parameters:
value - int

setReconnectionAttempts

public void setReconnectionAttempts(int value)
Sets the ReconnectionAttemptsForSMNotification property (int) value.
Specified by:
setReconnectionAttempts in interface CSClientService
Parameters:
value - int

setRetryOnError

public void setRetryOnError(boolean newRetryOnError)
Sets the retryOnError property (boolean) value.
Parameters:
newRetryOnError - boolean

setRunInSession

public void setRunInSession(boolean newRunInSession)
Sets the runInSession property (boolean) value.
Parameters:
newRunInSession - boolean

setServerCredentials

public void setServerCredentials(java.lang.String aServerCredentials)
Sets the serverCredentials property (String) value.
Specified by:
setServerCredentials in interface CSClientService
Parameters:
aServerCredentials - String

setServerId

protected void setServerId(java.lang.Long aServerId)
Sets the serverId property (Long) value.
Parameters:
aServerId - Long

setServerName

public void setServerName(java.lang.String serverName)
Sets the _serverName property (java.lang.String) value.
Specified by:
setServerName in interface CSClientService
Parameters:
serverName - java.lang.String

setSessionType

public void setSessionType(java.lang.String sessionType)
Sets the _sessionType property (java.lang.String) value.
Parameters:
sessionType - java.lang.String

setTimeBetweenReconnectionAttempts

public void setTimeBetweenReconnectionAttempts(long value)
Sets the TimeBetweenReconnectionAttempts property (long) value.
Specified by:
setTimeBetweenReconnectionAttempts in interface CSClientService
Parameters:
value - long

setTimeout

protected void setTimeout(long aTimeout)
Sets the timeout property (long) value.
Parameters:
aTimeout - long

setUsedForSrvToClEventNotif

public void setUsedForSrvToClEventNotif(boolean used)
Sets the _usedForSrvToClEventNotif property (boolean) value.
Specified by:
setUsedForSrvToClEventNotif in interface CSClientService
Parameters:
used - boolean

setUseProxy

public void setUseProxy(boolean value)
Sets the useProxy property (boolean) value.
Specified by:
setUseProxy in interface CSClientService
Parameters:
value - boolean

setUserAgent

public void setUserAgent(java.lang.String userAgent)
Sets the fieldUserAgent property (java.lang.String) value.
Parameters:
fieldUserAgent - java.lang.String

terminate

public void terminate()
               throws DSEException
This is called either from the application or from the context when it is destroyed or unchained.
Overrides:
terminate in class Service

toString

public java.lang.String toString()
Returns an SGML representation.
Overrides:
toString in class Service
Returns:
java.lang.String