com.ibm.dse.clientserver
Interface CSClientService

All Known Implementing Classes:
CSClient

public interface CSClientService
extends Notifier

The CSClientService interface provides the C/S service interface on the client side


Field Summary
static java.lang.String CS_REPLY_EVENT
           
static java.lang.String CS_REQUEST_ID
           
static java.lang.String CS_SESSION_STATUS
           
static java.lang.String CS_STATUS_CHANGED_EVENT
           
static int DOWN
           
static int NonSecure
           
static int NOT_ESTABLISHED
           
static int OK
           
static int RESET
           
static int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5
           
static int SSL_RSA_EXPORT_WITH_RC4_40_MD5
           
static int SSL_RSA_WITH_DES_CBC_SHA
           
static int SSL_RSA_WITH_NULL_MD5
           
static int SSL_RSA_WITH_NULL_SHA
           
 
Method Summary
 void addCSNotificationListener(CSNotificationListener newListener)
          Registers the notification of events
 void addCSReplyListener(CSReplyListener newListener)
          Registers the notification of a request reply
 void addCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
          Registers the notification of client/server status changes
 void closeSession()
          Closes the session.
 void establishSession()
          Establishes a session with the server.
 void establishSession(boolean newSession)
          Establishes a session with the server.
 long getDefaultOperationTimeout()
          Returns the timeout used in the methods: sendAndWait(ClientOperation), receive(ClientOperation, Integer), receive (Context, Integer)
 boolean getKeepAliveConnection()
          Returns false if the connection with the server is used only for one request.
 java.lang.String getKeyRingClass()
          Returns the package and class name that contains the certificate to establish a secure session.
 java.lang.String getProxyCredentials()
          Returns the authentification proxy info.
 java.lang.String getProxyHost()
          Returns the name of the proxy address (HTTP address).
 int getProxyPort()
          Gets the proxy port.
 int getReconnectionAttempts()
          Returns the number of attempts to reestablish the connection.
 java.lang.String getServerCredentials()
          Returns the authentification server info.
 java.lang.String getServerName()
          Returns the name of the server address (HTTP address).
 java.lang.String getServerTID()
          Gets the server terminal ID.
 java.lang.String getSessionId()
          Gets the session ID assigned by the server.
 int getSessionStatus()
          Gets the session status.
 int getSessionType()
          Gets the session type.
 long getTimeBetweenReconnectionAttempts()
          Gets the time between reconnection attempts when the session is down.
 boolean getUsedForSrvToClEventsNotif()
          Gets true if the CSClient is used on the server for client event notification.
 boolean getUseProxy()
          Returns true if the CSClientService establish a connection through a proxy.
 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 interfice.
 void removeCSReplyListener(CSReplyListener newListener)
          Removes the specified CSReplyListener so that it no longer receives CSReplyEvents from this interfice.
 void removeCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
          Removes the specified CSSessionStatusChangedListener so that it no longer receives CSSessionStatusChangedEvents from this interfice.
 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 setDefaultOperationTimeout(long aTimeout)
          Sets the defaultOperationTimeout property (long) value.
 void setKeepAliveConnection(boolean value)
          Sets the option to use the connection with the server for more than one request.
 void setKeyRingClass(java.lang.String aKeyRingClass)
          Sets the package and class name that contains the certificate to establish a secure session.
 void setProxyCredentials(java.lang.String aProxyCredentials)
          Sets the authentification proxy info.
 void setProxyHost(java.lang.String value)
          Sets set the name of the proxy address (HTTP address)
 void setProxyPort(int value)
          Sets the proxy port.
 void setReconnectionAttempts(int value)
          Sets the number of attempts to reestablish the connection.
 void setServerCredentials(java.lang.String aServerCredentials)
          Sets the authentification server info.
 void setServerName(java.lang.String serverName)
          Sets set the name of the server address (HTTP address)
 void setTimeBetweenReconnectionAttempts(long value)
          Sets the time between reconnection attempts when the session is down.
 void setUsedForSrvToClEventNotif(boolean used)
           
 void setUseProxy(boolean value)
          Sets the option to establish a connection with the server through a proxy.
 
Methods inherited from interface com.ibm.dse.base.Notifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, terminate
 

Field Detail

RESET

public static final int RESET

OK

public static final int OK

DOWN

public static final int DOWN

NOT_ESTABLISHED

public static final int NOT_ESTABLISHED

CS_STATUS_CHANGED_EVENT

public static final java.lang.String CS_STATUS_CHANGED_EVENT

CS_SESSION_STATUS

public static final java.lang.String CS_SESSION_STATUS

CS_REPLY_EVENT

public static final java.lang.String CS_REPLY_EVENT

CS_REQUEST_ID

public static final java.lang.String CS_REQUEST_ID

NonSecure

public static final int NonSecure

SSL_RSA_WITH_DES_CBC_SHA

public static final int SSL_RSA_WITH_DES_CBC_SHA

SSL_RSA_EXPORT_WITH_RC4_40_MD5

public static final int SSL_RSA_EXPORT_WITH_RC4_40_MD5

SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5

public static final int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5

SSL_RSA_WITH_NULL_MD5

public static final int SSL_RSA_WITH_NULL_MD5

SSL_RSA_WITH_NULL_SHA

public static final int SSL_RSA_WITH_NULL_SHA
Method Detail

addCSNotificationListener

public void addCSNotificationListener(CSNotificationListener newListener)
Registers the notification of events
Parameters:
newListener - com.ibm.dse.clientserver.CSNotificationListener

addCSReplyListener

public void addCSReplyListener(CSReplyListener newListener)
Registers the notification of a request reply
Parameters:
newListener - com.ibm.dse.clientserver.CSReplyListener

addCSSessionStatusChangedListener

public void addCSSessionStatusChangedListener(CSSessionStatusChangedListener newListener)
Registers the notification of client/server status changes
Parameters:
newListener - com.ibm.dse.clientserver.CSSessionStatusChangedListener

closeSession

public void closeSession()
                  throws DSECSInvalidRequestException
Closes the session.

establishSession

public void establishSession()
                      throws DSECSInvalidRequestException,
                             DSECSSessionNotEstablishedException
Establishes a session with the server.

establishSession

public void establishSession(boolean newSession)
                      throws DSECSInvalidRequestException,
                             DSECSSessionNotEstablishedException
Establishes a session with the server. Should the request attempt to create a session or use an existing session
Parameters:
boolean - newSession

getDefaultOperationTimeout

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

getKeepAliveConnection

public boolean getKeepAliveConnection()
Returns false if the connection with the server is used only for one request.
Returns:
boolean

getKeyRingClass

public java.lang.String getKeyRingClass()
Returns the package and class name that contains the certificate to establish a secure session.
Returns:
java.lang.String

getProxyCredentials

public java.lang.String getProxyCredentials()
Returns the authentification proxy info.
Returns:
java.lang.String

getProxyHost

public java.lang.String getProxyHost()
Returns the name of the proxy address (HTTP address).
Returns:
java.lang.String

getProxyPort

public int getProxyPort()
Gets the proxy port.
Returns:
int

getReconnectionAttempts

public int getReconnectionAttempts()
Returns the number of attempts to reestablish the connection.
Returns:
java.lang.String

getServerCredentials

public java.lang.String getServerCredentials()
Returns the authentification server info.
Returns:
java.lang.String

getServerName

public java.lang.String getServerName()
Returns the name of the server address (HTTP address).
Returns:
java.lang.String

getServerTID

public java.lang.String getServerTID()
Gets the server terminal ID.
Returns:
java.lang.String

getSessionId

public java.lang.String getSessionId()
Gets the session ID assigned by the server.
Returns:
java.lang.String

getSessionStatus

public int getSessionStatus()
Gets the session status. The values for session status are: RESET= 0, OK= 1, DOWN= 2, NOT_ESTABLISHED= 3.
Returns:
int

getSessionType

public int getSessionType()
Gets the session type. The types of session are:

NonSecure = 0

SSL_RSA_WITH_DES_CBC_SHA=1

SSL_RSA_EXPORT_WITH_RC4_40_MD5=2

SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5=3

SSL_RSA_WITH_NULL_MD5=4

SSL_RSA_WITH_NULL_SHA=5

Returns:
int

getTimeBetweenReconnectionAttempts

public long getTimeBetweenReconnectionAttempts()
Gets the time between reconnection attempts when the session is down.
Returns:
long

getUsedForSrvToClEventsNotif

public boolean getUsedForSrvToClEventsNotif()
Gets true if the CSClient is used on the server for client event notification.

getUseProxy

public boolean getUseProxy()
Returns true if the CSClientService establish a connection through a proxy.
Returns:
boolean

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
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.
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
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.
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 interfice.
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 interfice.
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 interfice.
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.
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
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.
Parameters:
aClientOperation - ClientOperation
timeout - long

sendEvent

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

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)
Parameters:
aTimeout - long

setKeepAliveConnection

public void setKeepAliveConnection(boolean value)
Sets the option to use the connection with the server for more than one request.
Parameters:
value - boolean

setKeyRingClass

public void setKeyRingClass(java.lang.String aKeyRingClass)
Sets the package and class name that contains the certificate to establish a secure session.
Parameters:
aKeyRingClass - java.lang.String

setProxyCredentials

public void setProxyCredentials(java.lang.String aProxyCredentials)
Sets the authentification proxy info. The parameter aProxyCredentials must be in the next format: "userId:password"
Parameters:
aProxyCredentials - java.lang.String

setProxyHost

public void setProxyHost(java.lang.String value)
Sets set the name of the proxy address (HTTP address)
Parameters:
value - java.lang.String

setProxyPort

public void setProxyPort(int value)
Sets the proxy port.
Parameters:
value - int

setReconnectionAttempts

public void setReconnectionAttempts(int value)
Sets the number of attempts to reestablish the connection.
Parameters:
value - int

setServerCredentials

public void setServerCredentials(java.lang.String aServerCredentials)
Sets the authentification server info. The parameter aServerCredentials must be in the next format: "userId:password"
Parameters:
aServerCredentials - java.lang.String

setServerName

public void setServerName(java.lang.String serverName)
Sets set the name of the server address (HTTP address)
Parameters:
serverName - java.lang.String

setTimeBetweenReconnectionAttempts

public void setTimeBetweenReconnectionAttempts(long value)
Sets the time between reconnection attempts when the session is down.
Parameters:
value - long

setUsedForSrvToClEventNotif

public void setUsedForSrvToClEventNotif(boolean used)
Parameters:
used - boolean

setUseProxy

public void setUseProxy(boolean value)
Sets the option to establish a connection with the server through a proxy.
Parameters:
used - boolean