IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.recorder.core.config
Class RecordingSessionConfiguration

java.lang.Object
  extended by com.ibm.rational.test.lt.recorder.core.property.AbstractConfiguration
      extended by com.ibm.rational.test.lt.recorder.core.config.RecordingSessionConfiguration
All Implemented Interfaces:
Serializable, Cloneable

public class RecordingSessionConfiguration
extends AbstractConfiguration

A recording session configuration object, used for holding options related to a recording session.
A configuration is usually produced by a UI component such as a wizard and consumed by a recording session. It contains generic or protocol-specific options that influence the behavior of the recording session, based on the choices made by the user in the UI component.
A recording session configuration has child configurations, one per recorder that should be run during the recording session.
A configuration contains options, which consist of a name and a value. Basic types are supported for the values: boolean, integer, string, strings list, enum, and maps. A configuration can be persisted as an XML document, and it can be reconstructed from the XML using RecordingConfigurationFactory.

See Also:
Serialized Form

Field Summary
static String AUTO_STOP
          A boolean specifying whether the session should automatically stop when all clients are terminated.
static String CONFIGURATION_FILE_NAME
          A string specifying the name of the file that the configuration was loaded from, if applicable.
static String ENCRYPTION_PASSPHRASE
          A string specifying the pass phrase used to encrypt the recording session content.
static String LOG_DEBUG_MESSAGES
          A boolean specifying that debug messages issued by recording components should be logged to eclipse error log as information messages.
static String OBFUSCATE
          A boolean specifying that the recording session file should be obfuscated, to prevent plain strings from being visible by a simple inspection of the file.
static String REC_SESSION_PATH
          A string specifying the generated recmodel path, relative to the workspace.
static String UPGRADED
          A boolean specifying that the session configuration is the result of an upgrade process from a recmodel to a recsession (i.e. from 8.1.x or previous to 8.2).
 
Fields inherited from class com.ibm.rational.test.lt.recorder.core.property.AbstractConfiguration
properties
 
Constructor Summary
RecordingSessionConfiguration()
           
 
Method Summary
protected  void addChildConfiguration(AbstractConfiguration config, String operandName)
           
protected  void afterXmlDeserialization()
           
protected  void beforeXmlSerialization()
           
 RecordingSessionConfiguration clone()
           
 ClientConfiguration getClientConfiguration(String type)
          Returns the client configuration defined in the session that has the specified type.
 List<ClientConfiguration> getClientConfigurations()
           
 List<ClientConfiguration> getClientConfigurations(String type)
          Returns the client configurations defined in the session configuration with the specified type.
protected  String getElementName()
           
protected  String getNamespace()
           
protected  String getPreferedPrefix()
           
protected  String getProtocol()
           
 RecorderClientBindingConfiguration getRecorderClientBinding(RecorderConfiguration recorderConfiguration, ClientConfiguration clientConfiguration)
          Returns the recorder-client binding between a specific recorder configuration and a specific client configuration.
 List<RecorderClientBindingConfiguration> getRecorderClientBindings()
           
 List<RecorderClientBindingConfiguration> getRecorderClientBindings(ClientConfiguration clientConfiguration)
          Returns the recorders bindings that are associated to the specified client configuration.
 List<RecorderClientBindingConfiguration> getRecorderClientBindings(RecorderConfiguration recorderConfiguration)
          Returns the client bindings that are associated to the specified recorder configuration.
 RecorderConfiguration getRecorderConfiguration(String type)
          Returns the recorder configuration defined in the session that has the specified type.
 List<RecorderConfiguration> getRecorderConfigurations()
           
 List<RecorderConfiguration> getRecorderConfigurations(String type)
          Returns the recorder configurations defined in the session configuration with the specified type.
protected  void writeChildConfigurations(javax.xml.stream.XMLStreamWriter writer)
           
 
Methods inherited from class com.ibm.rational.test.lt.recorder.core.property.AbstractConfiguration
assignUniqueIds, cloneProperties, get, getBoolean, getData, getEnum, getInteger, getList, getMap, getObfuscatedList, getObfuscatedString, getPreferedIdPrefixForChild, getString, getString, isOperand, loadAttributes, remove, saveDataToAttachment, serialize, setBoolean, setData, setData, setEnum, setInteger, setList, setMap, setObfuscatedList, setObfuscatedString, setString, toString, write, write, write, writeAttributes, writeChildConfiguration, writeChildConfigurations
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REC_SESSION_PATH

public static final String REC_SESSION_PATH
A string specifying the generated recmodel path, relative to the workspace. No recmodel is produced if this property is omitted.

See Also:
Constant Field Values

CONFIGURATION_FILE_NAME

public static final String CONFIGURATION_FILE_NAME
A string specifying the name of the file that the configuration was loaded from, if applicable. This property is not interpreted by the recording framework and is simply a piece of information for the user. This property is optional. It is automatically set when a configuration is loaded from an XML file (no need to specify this property within the XML file).

See Also:
Constant Field Values

AUTO_STOP

public static final String AUTO_STOP
A boolean specifying whether the session should automatically stop when all clients are terminated. Default value: true.

See Also:
Constant Field Values

UPGRADED

public static final String UPGRADED
A boolean specifying that the session configuration is the result of an upgrade process from a recmodel to a recsession (i.e. from 8.1.x or previous to 8.2). This is a marker that indicates that a new recording session cannot be built upon the session configuration. Default value: false.

See Also:
Constant Field Values

LOG_DEBUG_MESSAGES

public static final String LOG_DEBUG_MESSAGES
A boolean specifying that debug messages issued by recording components should be logged to eclipse error log as information messages. Default value: false.

See Also:
Constant Field Values

ENCRYPTION_PASSPHRASE

public static final String ENCRYPTION_PASSPHRASE
A string specifying the pass phrase used to encrypt the recording session content. If omitted, the recording will not be password-protected. This option is mutually exclusive with RecordingSessionConfiguration.OBFUSCATE.

See Also:
Constant Field Values

OBFUSCATE

public static final String OBFUSCATE
A boolean specifying that the recording session file should be obfuscated, to prevent plain strings from being visible by a simple inspection of the file. This option is mutually exclusive with RecordingSessionConfiguration.ENCRYPTION_PASSPHRASE.

See Also:
Constant Field Values
Constructor Detail

RecordingSessionConfiguration

public RecordingSessionConfiguration()
Method Detail

getRecorderConfigurations

public List<RecorderConfiguration> getRecorderConfigurations()

getClientConfigurations

public List<ClientConfiguration> getClientConfigurations()

getRecorderClientBindings

public List<RecorderClientBindingConfiguration> getRecorderClientBindings()

getRecorderConfigurations

public List<RecorderConfiguration> getRecorderConfigurations(String type)
Returns the recorder configurations defined in the session configuration with the specified type.

Parameters:
type - A recorder type.
Returns:
A list of recorder configurations of the specified type.

getRecorderConfiguration

public RecorderConfiguration getRecorderConfiguration(String type)
Returns the recorder configuration defined in the session that has the specified type. If there are more that one recorder configuration that match the specified type, an arbitrarily chosen configuration is returned.

Parameters:
type - A recorder type.
Returns:
A recorder configuration of the specified type, or null if none were found.

getRecorderClientBindings

public List<RecorderClientBindingConfiguration> getRecorderClientBindings(ClientConfiguration clientConfiguration)
Returns the recorders bindings that are associated to the specified client configuration.

Parameters:
clientConfiguration - A client configuration that belongs to this session.
Returns:
The list of recorders bindings that have a connection to the client configuration.

getRecorderClientBinding

public RecorderClientBindingConfiguration getRecorderClientBinding(RecorderConfiguration recorderConfiguration,
                                                                   ClientConfiguration clientConfiguration)
Returns the recorder-client binding between a specific recorder configuration and a specific client configuration.

Parameters:
recorderConfiguration - A recorder configuration that belongs to this session.
clientConfiguration - A client configuration that belongs to this session.
Returns:
The recorder-client binding matching the parameters, or null if it does not exist.

getClientConfigurations

public List<ClientConfiguration> getClientConfigurations(String type)
Returns the client configurations defined in the session configuration with the specified type.

Parameters:
type - A client type.
Returns:
A list of client configurations of the specified type.

getClientConfiguration

public ClientConfiguration getClientConfiguration(String type)
Returns the client configuration defined in the session that has the specified type. If there are more that one client configuration that match the specified type, an arbitrarily chosen configuration is returned.

Parameters:
type - A client type.
Returns:
A client configuration of the specified type, or null if none were found.

getRecorderClientBindings

public List<RecorderClientBindingConfiguration> getRecorderClientBindings(RecorderConfiguration recorderConfiguration)
Returns the client bindings that are associated to the specified recorder configuration.

Parameters:
recorderConfiguration - A recorder configuration that belongs to this session.
Returns:
The list of client bindings that have a link to the recorder configuration.

getElementName

protected String getElementName()
Specified by:
getElementName in class AbstractConfiguration

getNamespace

protected String getNamespace()
Specified by:
getNamespace in class AbstractConfiguration

getProtocol

protected String getProtocol()
Specified by:
getProtocol in class AbstractConfiguration

getPreferedPrefix

protected String getPreferedPrefix()
Specified by:
getPreferedPrefix in class AbstractConfiguration

beforeXmlSerialization

protected void beforeXmlSerialization()
Overrides:
beforeXmlSerialization in class AbstractConfiguration

writeChildConfigurations

protected void writeChildConfigurations(javax.xml.stream.XMLStreamWriter writer)
                                 throws javax.xml.stream.XMLStreamException
Overrides:
writeChildConfigurations in class AbstractConfiguration
Throws:
javax.xml.stream.XMLStreamException

addChildConfiguration

protected void addChildConfiguration(AbstractConfiguration config,
                                     String operandName)
                              throws InvalidConfigurationException
Overrides:
addChildConfiguration in class AbstractConfiguration
Throws:
InvalidConfigurationException

afterXmlDeserialization

protected void afterXmlDeserialization()
Overrides:
afterXmlDeserialization in class AbstractConfiguration

clone

public RecordingSessionConfiguration clone()
Specified by:
clone in class AbstractConfiguration

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.