IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.recorder.core.extensibility
Interface IClientDelegate

All Superinterfaces:
IRecordingComponentDelegate
All Known Implementing Classes:
AbstractExecutableClientDelegate, BaseClientDelegate, ProcessBuilderClientDelegate

public interface IClientDelegate
extends IRecordingComponentDelegate

A delegate responsible of managing the lifecycle of a specific type of client. A client delegate is responsible of honoring commands (START, STOP) and sending client events to the framework (STARTED, STOPPED). This interface is meant to be implemented by extensions which provide their own client implementation.


Method Summary
 void initialize(IClientContext context)
          Initializes this instance so it is ready to process commands and send events.
 void kill()
          Asks the client delegate to stop the client immediately and lose data if necessary.
 void postStop()
          Invoked after the client has notified its termination.
 boolean preStart()
          Invoked when the client is about to start.
 void start()
          Asks the client delegate to start the client.
 void stop()
          Asks the client delegate to stop the client.
 
Methods inherited from interface com.ibm.rational.test.lt.recorder.core.extensibility.IRecordingComponentDelegate
getProperty, messageReceived, setProperty
 

Method Detail

initialize

void initialize(IClientContext context)
                throws DelegateInitializeException
Initializes this instance so it is ready to process commands and send events. The initialization should be fast (i.e. no long-running initializations or large resource allocations) and the method should not return until the initialization is complete. Long-running or large resource allocations should be performed when the START command is received.

Parameters:
context - The client context, that provides the client configuration that this instance should conform to, and a mechanism for the delegate to send events to other involved components.
Throws:
DelegateInitializeException - If the delegate cannot be initialized or will not be able to run properly.

start

void start()
Asks the client delegate to start the client. No other command can occur before this command. This command can be issued only once. This method should return without waiting for the start process to be completed. The delegate is required to notify its context when the start is complete by invoking IClientContext.clientStarted().


stop

void stop()
Asks the client delegate to stop the client. This command can occur only once, and only after IClientDelegate.start() has been invoked. This method should return without waiting for the stop process to be completed. The delegate is required to notify its context when the stop is complete by invoking IClientContext#clientStopped().


kill

void kill()
Asks the client delegate to stop the client immediately and lose data if necessary. This command can occur only once, and only after IClientDelegate.start() has been invoked. This method should return without waiting for the stop process to be completed. The delegate is required to notify its context when the stop is complete by invoking IClientContext#clientStopped().


preStart

boolean preStart()
Invoked when the client is about to start. This method gives the client the opportunity to perform long-running operations that should happen before any decoration is applied to the client by the recorders involved in the session.

Returns:
Whether the client should continue. A false value indicates that an error has occurred and the client can not start. It is up to the implementation to notify any error using IRecordingComponentContext.getLog().
See Also:
IClientDelegate.postStop()

postStop

void postStop()
Invoked after the client has notified its termination. This method gives the client the opportunity to perform long-running operations that should occur after all decorations have been un-applied by the recorders involved in the session.

See Also:
IClientDelegate.preStart()

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.