IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.clientserver
Interface CSClientService

All Superinterfaces:
Notifier
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 java.lang.String ENABLESSL
           
static int NOT_ESTABLISHED
           
static int OK
           
static int RESET
           
static java.lang.String SSLENABLER
           
 
Method Summary
 void addCSConnectionCookies(java.lang.String clientCookieStr)
          Adds a client cookie for the connection.
 void addCSConnectionCookies(java.util.Vector clientCookiesVector)
          Adds client cookies for the connection.
 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 Should the request attempt to create a session or use an existing session
 long getDefaultOperationTimeout()
          Returns the timeout used in the methods sendAndWait(ClientOperation), receive(ClientOperation, Integer), receive (Context, Integer).
 int getEventsPort()
          Gets the events port.
 boolean getKeepAliveConnection()
          Returns false if the connection with the server is used only for one request.
 boolean getPermanentConnectionForEvents()
          Gets the permanentConnectionForEvents attribute
 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.net.ServerSocket getServerSocket()
          Gets the server socket.
 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.
 SSLEnabler getSSLEnabler()
          Returns the sslEnabler.
 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.
 boolean isEnableSSL()
          Returns the enableSSL.
 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 setEnableSSL(boolean enableSSL)
          Sets the enableSSL.
 void setEventsPort(int aPort)
          Sets the events port.
 void setKeepAliveConnection(boolean value)
          Sets the option to use the connection with the server for more than one request.
 void setPermanentConnectionForEvents(boolean permanent)
          Sets the permanentConnectionForEvents attribute.
 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 the name of the server address (HTTP address).
 void setServerSocket(java.net.ServerSocket aSocket)
          Sets the server socket.
 void setSSLEnabler(SSLEnabler sslEnabler)
          Sets the sslEnabler.
 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
See Also:
Constant Field Values

OK

public static final int OK
See Also:
Constant Field Values

DOWN

public static final int DOWN
See Also:
Constant Field Values

NOT_ESTABLISHED

public static final int NOT_ESTABLISHED
See Also:
Constant Field Values

CS_STATUS_CHANGED_EVENT

public static final java.lang.String CS_STATUS_CHANGED_EVENT
See Also:
Constant Field Values

CS_SESSION_STATUS

public static final java.lang.String CS_SESSION_STATUS
See Also:
Constant Field Values

CS_REPLY_EVENT

public static final java.lang.String CS_REPLY_EVENT
See Also:
Constant Field Values

CS_REQUEST_ID

public static final java.lang.String CS_REQUEST_ID
See Also:
Constant Field Values

ENABLESSL

public static final java.lang.String ENABLESSL
See Also:
Constant Field Values

SSLENABLER

public static final java.lang.String SSLENABLER
See Also:
Constant Field Values
Method Detail

addCSConnectionCookies

public void addCSConnectionCookies(java.util.Vector clientCookiesVector)
Adds client cookies for the connection.

Parameters:
clientCookiesVector - java.util.Vector

addCSConnectionCookies

public void addCSConnectionCookies(java.lang.String clientCookieStr)
Adds a client cookie for the connection.

Parameters:
clientCookieStr - java.lang.String

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.

Throws:
DSECSInvalidRequestException

establishSession

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

Throws:
DSECSInvalidRequestException
DSECSSessionNotEstablishedException

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

Throws:
DSECSInvalidRequestException
DSECSSessionNotEstablishedException

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

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

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
Throws:
DSECSInvalidRequestException
DSECSTimeoutException
DSECSRemoteOperationException

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
timeout - long
Throws:
DSECSInvalidRequestException
DSECSTimeoutException
DSECSRemoteOperationException

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
Throws:
DSECSInvalidRequestException
DSECSTimeoutException
DSECSRemoteOperationException

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
timeout - long
Throws:
DSECSInvalidRequestException
DSECSTimeoutException
DSECSRemoteOperationException

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
Throws:
DSECSInvalidRequestException

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
Throws:
DSECSTimeoutException
DSECSInvalidRequestException
DSECSRemoteOperationException

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
Throws:
DSECSTimeoutException
DSECSInvalidRequestException
DSECSRemoteOperationException

sendEvent

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

Throws:
DSECSInvalidRequestException

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

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 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.


getEventsPort

public int getEventsPort()
Gets the events port.

Returns:
int

getServerSocket

public java.net.ServerSocket getServerSocket()
Gets the server socket.

Returns:
java.net.ServerSocket

getPermanentConnectionForEvents

public boolean getPermanentConnectionForEvents()
Gets the permanentConnectionForEvents attribute

Returns:
boolean

setEventsPort

public void setEventsPort(int aPort)
Sets the events port.

Parameters:
aPort - int

setServerSocket

public void setServerSocket(java.net.ServerSocket aSocket)
Sets the server socket.

Parameters:
aSocket - java.net.ServerSocket

setPermanentConnectionForEvents

public void setPermanentConnectionForEvents(boolean permanent)
Sets the permanentConnectionForEvents attribute.


isEnableSSL

public boolean isEnableSSL()
Returns the enableSSL.

Returns:
boolean

setEnableSSL

public void setEnableSSL(boolean enableSSL)
Sets the enableSSL.

Parameters:
enableSSL - - The enableSSL to set

getSSLEnabler

public SSLEnabler getSSLEnabler()
Returns the sslEnabler.

Returns:
SSLEnabler

setSSLEnabler

public void setSSLEnabler(SSLEnabler sslEnabler)
Sets the sslEnabler.

Parameters:
sslEnabler - - The sslEnabler to set

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005