com.ibm.rational.test.lt.execution.socket.custom
Interface ISckConnectionHolder


public interface ISckConnectionHolder

ISckConnectionHolder is the interface to the underlying connection.


Method Summary
 byte[] getCurrentlyReceivedBytes()
          Only available before the receive action is terminated by a call to receiveSuccess() or handleException().
Otherwise, make use of getFinallyReceivedBytes().
 int getCurrentlyReceivedBytesCount()
          Only available before the receive action is terminated by a call to receiveSuccess() or handleException().
Otherwise, make use of getFinallyReceivedBytes().
 byte[] getFinallyReceivedBytes()
          Only available after the receive action is terminated by a call to receiveSuccess() or handleException().
Otherwise, make use of getCurrentlyReceivedBytes().
 int getFinallyReceivedBytesCount()
          Only available after the receive action is terminated by a call to receiveSuccess() or handleException().
Otherwise, make use of getCurrentlyReceivedBytesCount().
 java.lang.String getHostName()
           
 long getLastConnectOrSendTimeStamp()
          As a result of a call to System.currentTimeMillis(), timestamps are collected by the connection holder when the Connection and the Send actions are actually done.
 byte[] getLastSentBytes()
           
 int getLastSentBytesCount()
           
 int getPort()
           
 int getResponseTime()
           
 boolean isConnected()
           
 boolean isEndOfStream()
           
 void setResponseTime(int responseTime)
          Sets the response time to be reported.
Overrides the default value that can be retrieved by a call to getResponseTime().
See getResponseTime for the explanation about the default value.
Make use of getLastConnectOrSendTimeStamp() to get the timestamp of the starting event.
 

Method Detail

getHostName

java.lang.String getHostName()
Returns:
the host name or IP v4 or IP v6 address of the remote peer of the underlying connection.

getPort

int getPort()
Returns:
the port number of the remote peer of the underlying connection.

isConnected

boolean isConnected()
Returns:
true if the underlying connection is connected.

isEndOfStream

boolean isEndOfStream()
Returns:
true if the underlying connection has reached end of stream (i.e. has been closed by the remote peer).

getResponseTime

int getResponseTime()
Returns:
the time elapsed between the last Send or Connect action and the first byte of the response has been received
. This is the response time reported by default.

setResponseTime

void setResponseTime(int responseTime)
Sets the response time to be reported.
Overrides the default value that can be retrieved by a call to getResponseTime().
See getResponseTime for the explanation about the default value.
Make use of getLastConnectOrSendTimeStamp() to get the timestamp of the starting event.

Parameters:
responseTime - the new response time value to report

getLastConnectOrSendTimeStamp

long getLastConnectOrSendTimeStamp()
As a result of a call to System.currentTimeMillis(), timestamps are collected by the connection holder when the Connection and the Send actions are actually done.

Returns:
the timestamp of the starting event needed to compute a customized response time.

getLastSentBytesCount

int getLastSentBytesCount()
Returns:
the number of bytes sent on last Send action

getLastSentBytes

byte[] getLastSentBytes()
Returns:
the last sent bytes on last Send action

getCurrentlyReceivedBytesCount

int getCurrentlyReceivedBytesCount()
Only available before the receive action is terminated by a call to receiveSuccess() or handleException().
Otherwise, make use of getFinallyReceivedBytes().

Returns:
the number of bytes received since this action has started

getCurrentlyReceivedBytes

byte[] getCurrentlyReceivedBytes()
Only available before the receive action is terminated by a call to receiveSuccess() or handleException().
Otherwise, make use of getFinallyReceivedBytes().

Returns:
the bytes received since this action has started

getFinallyReceivedBytesCount

int getFinallyReceivedBytesCount()
Only available after the receive action is terminated by a call to receiveSuccess() or handleException().
Otherwise, make use of getCurrentlyReceivedBytesCount().

Returns:
the number of bytes received by this action

getFinallyReceivedBytes

byte[] getFinallyReceivedBytes()
Only available after the receive action is terminated by a call to receiveSuccess() or handleException().
Otherwise, make use of getCurrentlyReceivedBytes().

Returns:
the bytes received by this action