IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.recorder.core.session
Interface IClient

All Superinterfaces:
IRecordingComponent

public interface IClient
extends IRecordingComponent

A client is a concrete recording component that can be executed in order to produce traffic that will be capture by a IRecorder. A client can be started, stopped, and killed. Its nature and behavior are parameterized by its client configuration. It may be bound to zero or more recorders, which can set it up in a way that allow them to capture the traffic initiated by the client. A client belongs to a recording session, and has a state. It can be observed by listeners.


Method Summary
 void addListener(IClientListener listener)
           
 ClientConfiguration getClientConfiguration()
           
 List<IRecorder> getRecorders()
           
 ClientState getState()
          Returns the current state of the client.
 void kill()
          Asks the client to stop immediately, allowing it to lose data if necessary.
 void removeListener(IClientListener listener)
           
 void start()
          Starts the client.
 void stop()
          Asks the client to stop.
 
Methods inherited from interface com.ibm.rational.test.lt.recorder.core.session.IRecordingComponent
getName, getProperty, getSession, getType, sendMessage, setProperty
 

Method Detail

start

void start()
Starts the client. This method is asynchronous and the start completion will be notified to registered listeners.


stop

void stop()
Asks the client to stop. This method is asynchronous and the client termination will be notified to registered listeners. Note that the stop request may be ignored by the client if the client state does not permit termination.


kill

void kill()
Asks the client to stop immediately, allowing it to lose data if necessary. This method is asynchronous and the client termination will be notified to registered listeners. It is advised to rather invoke IClient.stop(), and then invoke IClient.kill() only if the client does respond to the stop request whereas there is no legitimate reason for it not to stop.


getClientConfiguration

ClientConfiguration getClientConfiguration()

addListener

void addListener(IClientListener listener)

removeListener

void removeListener(IClientListener listener)

getState

ClientState getState()
Returns the current state of the client. Note that when state is tested for a decision based on its value, the call to this method, the test, and the decision should be grouped together in a synchronized block on this component.
For instance:
 synchronized(client) {
   if (client.getState() == ClientState.RUNNING) {
     client.stop(); // This method may throw an IllegalStateException
                       // if invoked while the client is in STOPPING state
   }
 }
 

Returns:
the current state of the client

getRecorders

List<IRecorder> getRecorders()

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.