|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.DSENotifier | +--com.ibm.dse.base.Service | +--com.ibm.dse.cs.servlet.CSClient
The CSClient class provides the C/S service on the client side.
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 |
protected long TimeBetweenReconnectionAttempts
protected int ReconnectionAttemptsForSMNotification
protected transient CSNotificationListener aCSNotificationListener
protected transient CSReplyListener aCSReplyListener
protected transient CSSessionStatusChangedListener aCSSessionStatusChangedListener
protected HttpURLConnectionThin csReqProtocolConnection
protected java.lang.String csReqProtocolServletName
protected HttpURLConnectionThin csAssignConnection
protected java.lang.String csAssignServletName
protected HttpURLConnectionThin csNotifClToSrvConnection
protected java.lang.String csNotifClToSrvServletName
protected HttpURLConnectionThin csNotifSrvToClConnection
protected java.lang.String csNotifSrvToClServletName
protected Hashtable terminateThreads
protected boolean isCsReqProtocolConnectionFree
protected boolean isCsNotifClToSrvConnectionFree
protected boolean retryOnError
Constructor Detail |
public CSClient()
public CSClient(java.lang.String aName)
aName
- java.lang.StringMethod Detail |
public void addCSNotificationListener(CSNotificationListener newListener)
newListener
- com.ibm.dse.clientserver.CSNotificationListenerpublic void addCSReplyListener(CSReplyListener newListener)
newListener
- com.ibm.dse.clientserver.CSReplyListenerpublic void addCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
newListener
- com.ibm.dse.clientserver.CSSessionStatusChangedListenerpublic void closeSession() throws DSECSInvalidRequestException
public void establishSession() throws DSECSInvalidRequestException, DSECSSessionNotEstablishedException
public void establishSession(boolean newSession) throws DSECSInvalidRequestException, DSECSSessionNotEstablishedException
newSession
- booleanpublic void finalize()
protected void fireAndSignalCSReplyEvent(CSReplyEvent anEvent, java.lang.String eventName)
anEvent
- com.ibm.dse.clientserver.CSReplyEventeventName
- java.lang.Stringprotected void fireAndSignalCSStatusChangedEvent(CSSessionStatusChangedEvent anEvent, java.lang.String eventName)
anEvent
- com.ibm.dse.clientserver.CSReplyEventeventName
- java.lang.Stringprotected void fireHandleCSNotificationEvent(CSNotificationEvent event)
event
- com.ibm.dse.clientserver.CSNotificationEventprotected void fireHandleCSReplyEvent(CSReplyEvent event)
event
- com.ibm.dse.clientserver.CSReplyEventprotected void fireHandleCSSessionStatusChangedEvent(CSSessionStatusChangedEvent event)
event
- com.ibm.dse.clientserver.CSSessionStatusChangedEventprotected boolean firstDown()
protected void freeCsNotifClToSrvConnection(HttpURLConnectionThin aHttpURLConnectionThin)
aHttpURLConnectionThin
- com.ibm.dse.clientserver.servlet.HttpURLConnectionThinprotected void freeCsReqProtocolConnection(HttpURLConnectionThin aHttpURLConnectionThin)
aHttpURLConnectionThin
- com.ibm.dse.clientserver.servlet.HttpURLConnectionThinpublic boolean getCreateSession()
protected HttpURLConnectionThin getCsAssignConnection() throws java.lang.Exception
public java.lang.String getCsAssignServletName()
protected HttpURLConnectionThin getCsNotifClToSrvConnection() throws java.lang.Exception
public java.lang.String getCsNotifClToSrvServletName()
protected HttpURLConnectionThin getCsNotifSrvToClConnection() throws java.lang.Exception
public java.lang.String getCsNotifSrvToClServletName()
protected HttpURLConnectionThin getCsReqProtocolConnection() throws java.lang.Exception
public java.lang.String getCsReqProtocolServletName()
public long getDefaultOperationTimeout()
protected static java.lang.Integer getIdRequest()
public boolean getKeepAliveConnection()
public java.lang.String getKeyRingClass()
protected HttpURLConnectionThin getNewCsNotifClToSrvConnection() throws java.lang.Exception
protected HttpURLConnectionThin getNewCsReqProtocolConnection() throws java.lang.Exception
public java.lang.String getProxyCredentials()
public java.lang.String getProxyHost()
public int getProxyPort()
public int getReconnectionAttempts()
public boolean getRunInSession()
protected SendEventsBuffer getSendEventsBuffer()
public java.lang.String getServerCredentials()
protected java.lang.Long getServerId()
public java.lang.String getServerName()
public java.lang.String getServerTID()
protected java.lang.String getServiceId()
public java.lang.String getSessionId()
public int getSessionStatus()
public int getSessionType()
protected java.lang.String getStringSessionType()
public long getTimeBetweenReconnectionAttempts()
protected long getTimeout()
public boolean getUseCookie()
public boolean getUsedForSrvToClEventsNotif()
public boolean getUseProxy()
public java.lang.String getUserAgent()
public void handleCSAsynchronousReplyEvent(CSAsynchronousReplyEvent event)
event
- com.ibm.dse.clientserver.CSAsynchronousReplyEventpublic java.lang.Object initializeFrom(Tag aTag)
aTag
- com.ibm.dse.base.Tagpublic boolean isRetryOnError()
protected void manageCaseConnectionDown(java.lang.String who)
String
- public void receive(ClientOperation aClientOperation, java.lang.Integer requestId) throws DSECSInvalidRequestException, DSECSTimeoutException, DSECSRemoteOperationException
aClientOperation
- ClientOperationrequesId
- java.lang.Integerpublic void receive(ClientOperation aClientOperation, java.lang.Integer requestId, long timeout) throws DSECSInvalidRequestException, DSECSTimeoutException, DSECSRemoteOperationException
aClientOperation
- ClientOperationrequesId
- java.lang.Integertimeout
- longpublic void receive(Context aContext, java.lang.Integer requestId) throws DSECSInvalidRequestException, DSECSTimeoutException, DSECSRemoteOperationException
aContext
- ContextrequesId
- java.lang.Integerpublic void receive(Context aContext, java.lang.Integer requestId, long timeout) throws DSECSInvalidRequestException, DSECSTimeoutException, DSECSRemoteOperationException
aContext
- ContextrequesId
- java.lang.Integertimeout
- longpublic void removeCSNotificationListener(CSNotificationListener newListener)
newListener
- com.ibm.dse.clientserver.CSNotificationListenerpublic void removeCSReplyListener(CSReplyListener newListener)
newListener
- com.ibm.dse.clientserver.CSReplyListenerpublic void removeCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
newListener
- com.ibm.dse.clientserver.CSSessionStatusChangedListenerpublic java.lang.Integer send(ClientOperation aClientOperation) throws DSECSInvalidRequestException
aClientOperation
- ClientOperationpublic void sendAndWait(ClientOperation aClientOperation) throws DSECSTimeoutException, DSECSInvalidRequestException, DSECSRemoteOperationException
aClientOperation
- ClientOperationpublic void sendAndWait(ClientOperation aClientOperation, long timeout) throws DSECSTimeoutException, DSECSInvalidRequestException, DSECSRemoteOperationException
aClientOperation
- ClientOperationtimeout
- longpublic void sendEvent(java.util.EventObject myEvent) throws DSECSInvalidRequestException
evt
- EventObjectpublic void setCreateSession(boolean value)
boolean
- protected void setCsAssignConnection(HttpURLConnectionThin aCsAssignConnection)
aCsAssignConnection
- com.ibm.dse.clientserver.servlet.HttpURLConnectionThinpublic void setCsAssignServletName(java.lang.String newCsAssignServletName)
newCsAssignServletName
- java.lang.Stringprotected void setCsNotifClToSrvConnection(HttpURLConnectionThin aCsNotifClToSrvConnection)
aCsNotifClToSrvConnection
- com.ibm.dse.clientserver.servlet.HttpURLConnectionThinpublic void setCsNotifClToSrvServletName(java.lang.String newCsNotifClToSrvServletName)
newCsNotifClToSrvServletName
- java.lang.Stringprotected void setCsNotifSrvToClConnection(HttpURLConnectionThin aCsNotifSrvToClConnection)
aCsNotifSrvToClConnection
- com.ibm.dse.clientserver.servlet.HttpURLConnectionThinpublic void setCsNotifSrvToClServletName(java.lang.String newCsNotifSrvToClServletName)
newCsNotifSrvToClServletName
- java.lang.Stringprotected void setCsReqProtocolConnection(HttpURLConnectionThin aCsReqProtocolConnection)
aCsReqProtocolConnection
- com.ibm.dse.clientserver.servlet.HttpURLConnectionThinpublic void setCsReqProtocolServletName(java.lang.String newCsReqProtocolServletName)
newCsReqProtocolServletName
- java.lang.Stringpublic void setDefaultOperationTimeout(long aTimeout)
aTimeout
- longpublic void setKeepAliveConnection(boolean value)
value
- booleanpublic void setKeyRingClass(java.lang.String aKeyRingClass)
aKeyRingClass
- java.lang.Stringpublic void setProxyCredentials(java.lang.String aProxyCredentials)
aProxyCredentials
- Stringpublic void setProxyHost(java.lang.String value)
value
- Stringpublic void setProxyPort(int value)
value
- intpublic void setReconnectionAttempts(int value)
value
- intpublic void setRetryOnError(boolean newRetryOnError)
newRetryOnError
- booleanpublic void setRunInSession(boolean newRunInSession)
newRunInSession
- booleanpublic void setServerCredentials(java.lang.String aServerCredentials)
aServerCredentials
- Stringprotected void setServerId(java.lang.Long aServerId)
aServerId
- Longpublic void setServerName(java.lang.String serverName)
serverName
- java.lang.Stringpublic void setSessionType(java.lang.String sessionType)
sessionType
- java.lang.Stringpublic void setTimeBetweenReconnectionAttempts(long value)
value
- longprotected void setTimeout(long aTimeout)
aTimeout
- longpublic void setUsedForSrvToClEventNotif(boolean used)
used
- booleanpublic void setUseProxy(boolean value)
value
- booleanpublic void setUserAgent(java.lang.String userAgent)
fieldUserAgent
- java.lang.Stringpublic void terminate() throws DSEException
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |