|
IBM Rational Performance Tester SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRecordingSession
A recording session represents a concrete session involving one or more recorders
and
zero or more clients
. Clients initiate traffic which is captured by recorders they
are bound to. A session can be started
and stopped
. A session
and its recording components is parameterized by its configuration
.
A session persists the data captured by the recorders in its persistence file
.
It has a state
and can observed by listeners
.
RecorderCore.createRecordingSession(RecordingSessionConfiguration)
Method Summary | |
---|---|
void |
addListener(IRecordingSessionListener listener)
|
boolean |
areDependenciesSatisfied()
Returns whether all the required extensions necessary to read the recording session content are available. |
long |
currentTime()
Returns a value that corresponds to the current time. |
int |
getAnnotationCount()
Returns the count of annotations that were emitted during the session. |
List<IRecorderPacketReference> |
getAnnotationPacketReferences(IPacketReferenceInputStream stream)
Returns the annotations packet references that were emitted during the session. |
List<IRecorderAnnotationPacket> |
getAnnotationPackets()
Returns the annotations packets that were emitted during the session. |
IClient |
getClient(short clientId)
|
List<IClient> |
getClients()
|
RecordingSessionConfiguration |
getConfiguration()
|
IPacketInputStream |
getContent()
Returns the recorded content of the session, as a packet input stream. |
IPacketReferenceInputStream |
getContentAsReference()
Returns the recorded content of the session, as a packet reference input stream. |
com.ibm.rational.test.lt.recorder.core.encrypt.EncryptionLevel |
getEncryptionLevel()
Returns the encryption level used to protect access to this recording session. |
IFile |
getPersistenceFile()
|
IRecorder |
getRecorder(short recorderId)
|
List<IRecorder> |
getRecorders()
|
RecordingSessionState |
getState()
Returns the current state of the session. |
IRecordingSessionStatistics |
getStatistics()
Returns statistics about the data stored in the persistence file. |
ITimeReference |
getTimeReference()
Returns the time reference that allows to convert back and forth time expressed in the recording session clock and times expressed in milliseconds. |
boolean |
isFromFutureVersion()
Returns true if this recording session is from a future version. |
boolean |
isUpgradeNeeded()
Returns whether the recording session needs to be upgraded to achieve full performance. |
void |
killClients()
|
void |
removeListener(IRecordingSessionListener listener)
|
void |
sendMessage(Message message)
Sends a message to some components of the recording session. |
void |
setEncryptionLevel(com.ibm.rational.test.lt.recorder.core.encrypt.IEncryptionParameter encryptionParameter)
Modifies the encryption level of the file. |
void |
start()
|
void |
stop()
|
void |
unlock(com.ibm.rational.test.lt.recorder.core.encrypt.IEncryptionParameter encryptionParameter)
Unlocks access to this recording session by providing the encryption parameter. |
void |
upgrade()
Performs upgrade of the recording session file. |
Method Detail |
---|
List<IRecorder> getRecorders()
List<IClient> getClients()
IRecorder getRecorder(short recorderId)
IClient getClient(short clientId)
void start()
void stop()
void killClients()
IFile getPersistenceFile()
RecordingSessionConfiguration getConfiguration()
void addListener(IRecordingSessionListener listener)
void removeListener(IRecordingSessionListener listener)
RecordingSessionState getState()
synchronized(session) { if (session.getState() == RecordingSessionState.RUNNING) { session.stop(); // This method may throw an IllegalStateException // if invoked while the session is in STOPPING_CLIENTS state } }
void sendMessage(Message message)
message
- long currentTime()
IRecordingSessionStatistics getStatistics()
null
before the session is started, and it may be null
if the session does not
persist recorded data (because no persistence file has been specified in the recording
session configuration).ITimeReference getTimeReference()
null
if the session has not started yet (i.e. when IRecordingSession.getState()
returns
RecordingSessionState.INITIAL
).
IPacketInputStream getContent() throws IOException
null
if the no output file was specified in the recording
session configuration.
IOException
- Any exception thrown by the underlying I/O layer.IPacketReferenceInputStream getContentAsReference() throws IOException
null
if the no output file was specified in the recording
session configuration.
IOException
- Any exception thrown by the underlying I/O layer.List<IRecorderAnnotationPacket> getAnnotationPackets() throws IOException
IOException
List<IRecorderPacketReference> getAnnotationPacketReferences(IPacketReferenceInputStream stream) throws IOException
stream
- A content stream holding the returned references. This stream must have been
obtained through a call to IRecordingSession.getContentAsReference()
on this recording session.
IOException
int getAnnotationCount()
IRecordingSession.getAnnotationPackets()
.size(), but much more efficient.
boolean isUpgradeNeeded()
true
if the recording session needs upgrading, false
if its format
is up-to-date.void upgrade()
RecordingSessionState.CONVERTING
. Invokers can be notified of the upgrade completion
by registering a state listener and checking when the state changes from
RecordingSessionState.CONVERTING
to RecordingSessionState.TERMINATED
.
This method does nothing if the recording session is already up-to-date.
This method throws an exception if all extensions necessary to load the packets are
not installed (as reported by IRecordingSession.areDependenciesSatisfied()
).
boolean areDependenciesSatisfied()
IRecordingSession.getContent()
and IRecordingSession.getContentAsReference()
will throw an exception.
com.ibm.rational.test.lt.recorder.core.encrypt.EncryptionLevel getEncryptionLevel()
void setEncryptionLevel(com.ibm.rational.test.lt.recorder.core.encrypt.IEncryptionParameter encryptionParameter)
RecordingSessionState.CONVERTING
. Invokers can be notified of the operation
completion by registering a state listener and checking when the state changes from
RecordingSessionState.CONVERTING
to RecordingSessionState.TERMINATED
.
This method does nothing if the recording session already has the same encryption method.
This method throws an exception if all extensions necessary to load the packets are
not installed (as reported by IRecordingSession.areDependenciesSatisfied()
).
encryptionParameter
- The new encryption parameter.void unlock(com.ibm.rational.test.lt.recorder.core.encrypt.IEncryptionParameter encryptionParameter)
encryptionParameter
- The encryption parameter.boolean isFromFutureVersion()
|
IBM Rational Performance Tester SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |