IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.testgen.core.conversion
Interface IPacketConverter

All Superinterfaces:
IPacketReferenceOutputStream
All Known Implementing Classes:
BasePacketConverter

public interface IPacketConverter
extends IPacketReferenceOutputStream

A packet converter performs the on-the-fly conversion of a recorder packet stream to another recorder packet stream. The conversion may result in the same number of packets, or less, or more packets, of the same type or of a different type. A packet converter is passed input packets one by one. Depending of its logic, it may decide, after each packet it receives, to emit zero to many packets to its output stream.


Method Summary
 void complete()
          Completes the conversion.
 void dispose()
          Allows the converter to release any resources it has allocated.
 Set<String> getOutputPacketTypes(Set<String> inputPacketTypes)
          Returns all packet types that this converter can produce, for the given set of packet input types.
 void initialize(IPacketConverterContext context)
          Initializes the packet converter.
 
Methods inherited from interface com.ibm.rational.test.lt.testgen.core.conversion.IPacketReferenceOutputStream
writePacket
 

Method Detail

getOutputPacketTypes

Set<String> getOutputPacketTypes(Set<String> inputPacketTypes)
Returns all packet types that this converter can produce, for the given set of packet input types.

Parameters:
inputPacketTypes - A set of packet types.
Returns:
The set of all the packet types that this converter can output, for each specified input packet type.

initialize

void initialize(IPacketConverterContext context)
                throws CoreException
Initializes the packet converter.

Parameters:
context - The context that can be used by the packet converter to read its configuration, retrieve its output stream or create attachments. At this time the converter may not emit packet (IPacketConverterContext.getOutputStream() will return null).
Throws:
CoreException - If the packet converter cannot initialize and operate.

complete

void complete()
              throws IOException
Completes the conversion. This method is invoked after all packets have been passed to the converter, so it can emit additional packets. There is no guaranty that this method is invoked, even if some packets have been passed to the converter (for example, if the test generation process has been canceled). For clean-up and resource disposal, implement IPacketConverter.dispose() instead.

Throws:
IOException

dispose

void dispose()
Allows the converter to release any resources it has allocated. This method is guaranteed to be invoked if IPacketConverter.initialize(IPacketConverterContext) has been invoked.


IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.