public interface IKChannel extends IKAction
Modifier and Type | Field and Description |
---|---|
static int |
KC_CANCELTIMEOUT |
static int |
KC_CONNECTED |
static int |
KC_CONNECTFAIL |
static int |
KC_DELAY |
static int |
KC_FINISHCONNECT |
static int |
KC_FINISHHANDSHAKE |
static int |
KC_FINISHREAD |
static int |
KC_HANDSHAKE_COMPLETE |
static int |
KC_HANDSHAKE_REQUESTREAD |
static int |
KC_READCOMPLETED |
static int |
KC_READFAIL |
static int |
KC_READING |
static int |
KC_REQUESTCONNECT |
static int |
KC_REQUESTREAD |
static int |
KC_UNCONNECTED |
static int |
KC_WRITING |
static String[] |
KCStatus |
ABANDONED, DP_ENCRYPTED_VALUES_KEY, EXECUTING, FINISHED, HANDLETIMER, SEMWAIT, SLEEPING, Status, UNSTARTED
HISTORY_ALL, HISTORY_NONE, HISTORY_PAGES, HISTORY_REQUESTS, HISTORY_SCHEDULE, LOG_ALL, LOG_CONFIG, LOG_FINE, LOG_FINER, LOG_FINEST, LOG_INFO, LOG_NONE, LOG_SEVERE, LOG_WARNING, STATISTIC_ALL, STATISTIC_NONE, STATISTIC_PAGES
STORAGE_ENV, STORAGE_LOCAL, STORAGE_SYSTEM, STORAGE_USER
Modifier and Type | Method and Description |
---|---|
void |
connect(InetSocketAddress address) |
void |
connect(InetSocketAddress localAddress,
InetSocketAddress remoteAddress) |
IKernelChannel |
getChannel() |
int |
getState() |
void |
handleConnect(Throwable throwable) |
void |
handleHandshakeComplete(Throwable throwable)
Called by the Kernel after SSL handshake has completed.
|
long |
handleRead(ByteBuffer buffer,
long byteCount,
Throwable throwable)
Called by the Kernel after a channel has data available.
|
void |
read() |
void |
readHandshake()
Handshake read has distinct states from regular read.
|
void |
registerConnect(Selector s) |
void |
registerRead(Selector s) |
void |
retry()
Attempt to try this entire I/O action over again.
|
void |
retry(boolean closeConnection)
Attempt to try this entire I/O action over again.
|
void |
setChannel(IKernelChannel channel)
Instruct this channel to reuse an existing channel.
|
void |
setState(int state) |
abandon, addEventBehavior, blocked, execute, executeAction, executionTime, findDataArea, finish, getBlockedTimeout, getHistory, getHistoryType, getId, getName, getParent, getResultInteger, getResultObject, getResultString, getRtbEnabled, getStatTree, getStopRequested, getSubsystem, getTimeoutDuration, getTimeoutScheme, getVirtualUserName, getWorkerThread, hasFinished, hasStarted, isRunning, reset, setBlockedTimeout, setDispatchingAction, setHistory, setHistoryType, setId, setResultInteger, setResultObject, setResultString, setResultString, setRtbEnabled, setStatTree, start, status, stop, stop, stopAction
addCounter, getCounter, getCounters, resetCounters
getHistoryLevel, getHistoryLevel, getLogLevel, getStatisticsLevel, getVirtualUserGUID, log, log, log, log, reportEvent, reportEvent, reportEvent, reportMessage, reportMessage, reportMessage, reportVerdict, reportVerdict, reportVerdict, reportVerdict, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, wouldARM, wouldLog, wouldReportHistory, wouldReportHistory, wouldReportStatistics
acquire, availablePermits, getQueue, getQueueLength, reducePermits, release, release, toString, tryAcquire, tryAcquire
getARM, getLoopControl, getPDLogManager, getStatisticsManager, getTestLogManager, getTime, getTransaction, getValue, setValue
static final int KC_UNCONNECTED
static final int KC_REQUESTCONNECT
static final int KC_FINISHCONNECT
static final int KC_CONNECTED
static final int KC_CONNECTFAIL
static final int KC_WRITING
static final int KC_REQUESTREAD
static final int KC_FINISHREAD
static final int KC_READING
static final int KC_READCOMPLETED
static final int KC_READFAIL
static final int KC_CANCELTIMEOUT
static final int KC_DELAY
static final int KC_HANDSHAKE_REQUESTREAD
static final int KC_FINISHHANDSHAKE
static final int KC_HANDSHAKE_COMPLETE
static final String[] KCStatus
void retry()
retry()
closes the connection (if open),
resets internal structures, cancels any waiting timeouts,
and redispatchs the action for execution. This will result
in the execute()
method being called again.
Note: finish()
should not
be called after this method is called. Your method should just
return.
IKChannel.retry(boolean)
void retry(boolean closeConnection)
This version of retry
will optionally close the
connection (if the closeConnection boolean is true),
reset internal structures, cancel any waiting timeouts,
and redispatch the action for execution. This will result
in the execute()
method being called again.
Note: finish()
should not
be called after this method is called. Your method should just
return.
closeConnection
- reset the connection if true
void connect(InetSocketAddress address) throws Exception
Exception
void connect(InetSocketAddress localAddress, InetSocketAddress remoteAddress) throws Exception
Exception
void handleConnect(Throwable throwable)
void read()
long handleRead(ByteBuffer buffer, long byteCount, Throwable throwable)
buffer
- bytes of data read from channelbyteCount
- number of bytes placed into 'buffer'throwable
- void readHandshake()
void handleHandshakeComplete(Throwable throwable)
void setChannel(IKernelChannel channel)
This method can be used to insure that one I/O operation uses the same connection to a back-end server that some previous operation used.
Examples of where this may be more important or efficient: SSL, NTLM, DigiCerts, Keep-Alive, telnet, etc.
If this connectivity (between I/O operations) is unnecessary (as in the case of more general web testing or load generation, it will likely be more efficient to allow the kernel to pool its resources and choose for itself which connection to use.
In general, if using this operational characteristic, make sure you understand the implications of reusing these channels. Also, it would be good practice to daisy-chain references to these actions as opposed to having all subsequent actions reuse one initial action.
Notes:
close()
should be explicitly called by the script
if the next action should re-establish a new connection.
channel
- the kernel channel to reuseIKernelChannel getChannel()
void registerConnect(Selector s) throws ClosedChannelException, com.ibm.rational.test.lt.kernel.io.KMonitoredChannelException
ClosedChannelException
com.ibm.rational.test.lt.kernel.io.KMonitoredChannelException
void registerRead(Selector s) throws ClosedChannelException, com.ibm.rational.test.lt.kernel.io.KMonitoredChannelException
ClosedChannelException
com.ibm.rational.test.lt.kernel.io.KMonitoredChannelException
int getState()
void setState(int state)
© Copyright IBM Corp. 2013. All rights reserved.