IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.trace
Class Utilities

java.lang.Object
  extended by com.ibm.rational.test.lt.trace.Utilities

public class Utilities
extends Object


Constructor Summary
Utilities()
           
 
Method Summary
static MsgRepository createRepository(String name)
          Instantiates a MsgRepository object suitable for encapsulating protocol data.
static Msg deserializeMsg(byte[] buffer, int offset, int length)
          De-serializes the given byte stream back into a Msg.
protected static String deserializeVersion(String version)
          Serializes the given Msg into a byte stream.
static byte[] serializeMsg(Msg msg)
          Serializes the given Msg into a byte stream.
protected static String serializeVersion(String version)
          Serializes the given Msg into a byte stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities

public Utilities()
Method Detail

serializeMsg

public static byte[] serializeMsg(Msg msg)
Serializes the given Msg into a byte stream. This method is used by the recorder agent to place Msg into form suitable for transmission from RAC to recorder-data-processor residing on the WorkBench.

Parameters:
msg - the Msg object to be serialized
Returns:
the byte stream

deserializeMsg

public static Msg deserializeMsg(byte[] buffer,
                                 int offset,
                                 int length)
                          throws TraceException
De-serializes the given byte stream back into a Msg. This method is used by the recorder-data-processor residing on the WorkBench to place data into form suitable for transferal to Msg repository.

Parameters:
buffer - the byte stream to be de-serialized
offset - the offset into the byte stream to begin de-serialization
length - the length of the byte stream to de-serialize
Returns:
the Msg object
Throws:
TraceException

createRepository

public static MsgRepository createRepository(String name)
                                      throws TraceException
Instantiates a MsgRepository object suitable for encapsulating protocol data. Used by recorder-data-processor running on the WorkBench to create repository.

Parameters:
name - the path to the recording file (example '/testproj/test1.recmodel')
Returns:
the MsgRepository object
Throws:
TraceException

serializeVersion

protected static String serializeVersion(String version)
Serializes the given Msg into a byte stream. This method is used by the recorder agent to place Msg into form suitable for transmission from RAC to recorder-data-processor residing on the WorkBench.

Parameters:
version - the Msg object to be serialized
Returns:
the byte stream

deserializeVersion

protected static String deserializeVersion(String version)
Serializes the given Msg into a byte stream. This method is used by the recorder agent to place Msg into form suitable for transmission from RAC to recorder-data-processor residing on the WorkBench.

Parameters:
version - the Msg object to be serialized
Returns:
the byte stream

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.