IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.recorder.compatibility.upgrade
Interface IMsgUpgrader


public interface IMsgUpgrader

Handles the conversion of Payload Messages from recordings produced using RPT <= 8.1 to new recorder packets used in RPT 8.2, for a specific Msg {vendor,protocol,version} triplet. Implementations of this interface are registered using the extension point com.ibm.rational.test.lt.recorder.compatibility.recmodelUpgrader.exsd. An upgrader is given one Msg at a time, and has the opportunity to emit zero to many packets. It can also populate the recmodel's recording session configuration.


Method Summary
 void completeUpgrade(IPacketOutputStream writer, RecordingSessionConfiguration configuration)
          Completes the upgrade.
 boolean convertMessage(Msg msg, IPacketOutputStream writer, RecordingSessionConfiguration configuration)
          Converts the provided Msg.
 long getRecordingInitialTime()
          Returns the initial time of the recording, if this piece of information is available, expressed as milliseconds since the time 00:00:00 UTC on January 1, 1970.
 void initializeUpgrade(IPacketOutputStream writer, RecordingSessionConfiguration configuration, IRecModelUpgradeLog log)
          Initializes this upgrader.
 

Method Detail

initializeUpgrade

void initializeUpgrade(IPacketOutputStream writer,
                       RecordingSessionConfiguration configuration,
                       IRecModelUpgradeLog log)
                       throws IOException
Initializes this upgrader. This step is invoked before any message conversion, and only performed if at least one message will be passed along to this upgrader.

Parameters:
writer - A recmodel writer that can be used to emit zero or more packets.
configuration - A recording session configuration that can be augmented with recorder configurations and options as needed.
Throws:
IOException

convertMessage

boolean convertMessage(Msg msg,
                       IPacketOutputStream writer,
                       RecordingSessionConfiguration configuration)
                       throws IOException
Converts the provided Msg.

Parameters:
msg - The input Msg to convert.
writer - A recmodel writer that can be used to emit zero or more packets that result from the conversion of the message.
configuration - A recording session configuration that can be augmented with options that result from the conversion of the message.
Returns:
Whether the conversion has succeeded
Throws:
IOException - Any exception thrown by the writer

completeUpgrade

void completeUpgrade(IPacketOutputStream writer,
                     RecordingSessionConfiguration configuration)
                     throws IOException
Completes the upgrade. This step is invoked after all messages conversion, and only performed if at least one message has been passed along to this upgrader (and even if all IMsgUpgrader.convertMessage(Msg, IPacketOutputStream, RecordingSessionConfiguration) invocations have returned false).

Parameters:
writer - A recmodel writer that can be used to emit zero or more packets.
configuration - A recording session configuration that can be augmented with recorder configurations and options as needed.
Throws:
IOException

getRecordingInitialTime

long getRecordingInitialTime()
Returns the initial time of the recording, if this piece of information is available, expressed as milliseconds since the time 00:00:00 UTC on January 1, 1970. If it is not available, 0L should be returned.

Returns:
the initial time of the recording or 0L.

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.