public abstract class LisaCollector extends java.lang.Object implements IReport
Modifier and Type | Field and Description |
---|---|
static boolean |
debug |
static int |
LISA_NODEMSG_TESTEVENT |
java.lang.String |
method |
static java.lang.String |
STATUS_ALL |
static java.lang.String |
STATUS_EXTERNALERROR |
static java.lang.String |
STATUS_FAIL_CODES |
static java.lang.String |
STATUS_FAILED |
static java.lang.String |
STATUS_INPUTERROR |
static java.lang.String |
STATUS_NONFAIL_CODES |
static java.lang.String |
STATUS_OK_CODES |
static java.lang.String |
STATUS_SUCCESS |
static java.lang.String |
STATUS_UNKNOWN |
static java.lang.String |
TYPE_AGENT_CLIENT |
static java.lang.String |
TYPE_BW |
static java.lang.String |
TYPE_BW_INBOUND |
static java.lang.String |
TYPE_BW_OUTBOUND |
static java.lang.String |
TYPE_BW_WS |
static java.lang.String |
TYPE_EJB |
static java.lang.String |
TYPE_EJB_INBOUND |
static java.lang.String |
TYPE_EJB_OUTBOUND |
static java.lang.String |
TYPE_FRAMEWORK |
static java.lang.String |
TYPE_HTTP |
static java.lang.String |
TYPE_HTTP_INBOUND |
static java.lang.String |
TYPE_HTTP_OUTBOUND |
static java.lang.String |
TYPE_HTTPS |
static java.lang.String |
TYPE_IBM_MQ |
static java.lang.String |
TYPE_IBM_WPS |
static java.lang.String |
TYPE_JDBC |
static java.lang.String |
TYPE_JMS |
static java.lang.String |
TYPE_JMS_INBOUND |
static java.lang.String |
TYPE_JMS_OUTBOUND |
static java.lang.String |
TYPE_REST_HTTP |
static java.lang.String |
TYPE_RMI |
static java.lang.String |
TYPE_UNKNOWN |
static java.lang.String |
TYPE_WMBROKER |
static java.lang.String |
TYPE_WMBROKER_INBOUND |
static java.lang.String |
TYPE_WMBROKER_OUTBOUND |
static java.lang.String |
TYPE_WMIS |
static java.lang.String |
TYPE_WMIS_INBOUND |
static java.lang.String |
TYPE_WMIS_OUTBOUND |
static java.lang.String |
TYPE_WS |
static java.lang.String |
TYPE_WS_INBOUND |
static java.lang.String |
TYPE_WS_OUTBOUND |
Constructor and Description |
---|
LisaCollector()
Default constructor that is not currently used
|
LisaCollector(CompInfo parentComp,
java.lang.String name) |
LisaCollector(CompInfo parentComp,
java.lang.String name,
Integrator integrator)
Constructor used when creating new reporting objects
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addBatch(java.sql.Statement statement,
java.lang.String prepared,
java.lang.String sql,
long execTimeMillis)
Called by the LisaJdbcDriver each time a batch is added to a JDBC statement.
|
java.lang.String |
addBatch(java.lang.String connectionInfo,
java.sql.Statement statement,
java.lang.String prepared,
java.lang.String sql,
long execTimeMillis) |
void |
addChild(CompInfo child) |
void |
addEjbEvent(java.lang.String event)
Add an ejb event.
|
java.lang.String |
addLoggedSql(LoggedSql loggedSql) |
void |
addLogMessage(java.lang.String loggerName,
java.lang.String level,
java.lang.String message)
Take note of a server-side log message.
|
java.lang.String |
addSql(java.sql.Statement statement,
java.lang.String prepared,
java.lang.String sql,
long elapsed)
Called by the LisaJdbcDriver each time a SQL is issued.
|
java.lang.String |
addSql(java.lang.String connectionInfo,
java.sql.Statement statement,
java.lang.String prepared,
java.lang.String sql,
long elapsed) |
void |
assertFailTrans(boolean expr)
Provides a handy way for you to quickly make an assertion that LISA should consider
this transaction failed if the following is not true.
|
void |
assertFailTrans(boolean expr,
java.lang.String statusMsg)
Provides a handy way for you to quickly make an assertion that LISA should consider
this transaction failed if the following is not true.
|
void |
assertLog(boolean expr,
java.lang.String logMsg)
Provides the server component author with a mechansim to validate an assertion and
log a message into the test event collection system within Lisa if the given
assertion is false.
|
void |
finished()
Tells us we've completed processing this component, and takes defaults for all end-status
kinds of things.
|
void |
finished(java.lang.String buildStatus,
java.lang.String buildMsg,
java.lang.Throwable tw,
java.lang.String content)
This method is called when the compnent (trans or comp) is finished processing.
|
long |
getAgentId() |
protected java.lang.String |
getAgentName() |
java.lang.String |
getBuildStatus()
Returns the build status for this component.
|
java.lang.String |
getBuildStatusMsg()
Returns the build status message
|
long |
getBuildTime()
Returns the component execution time in milliseconds.
|
java.util.List<CompInfo> |
getChildren()
Returns the list of children maintained by this reporting object
|
java.lang.String |
getClassName() |
java.lang.String |
getCompContent()
Will return the component content for this component, or null if none was provided.
|
java.util.List |
getContentUsed()
Returns a List of content keys that were reportedly used by the system under test
Elements of this collection are of the java.lang.String type.
|
java.util.List |
getEjbEvents() |
long |
getEndTime() |
ExceptionInfo |
getException()
Returns an ExceptionInfo object that wraps an exception that was reported by the system
under test for this component, or null if there was not one reported.
|
java.util.List<ExceptionInfo> |
getExceptionList() |
JvmInfo |
getJvmInfo() |
java.util.List |
getLISAProps()
Returns the set of Lisa property set requests that the server component has requested,
or null if there were none.
|
java.util.List |
getLISATestEvents()
Returns a List of the test events set by this component, or null if there weren't any
|
java.util.List |
getLoggedMessages() |
java.util.List |
getLoggedSqls() |
java.lang.String |
getMethod() |
java.util.List |
getMissingContent()
Returns a List of content keys that were reported missing by the system under test
Elements of this collection are of the java.lang.String type.
|
java.lang.String |
getName()
Returns the descriptive name given to this reporting object
|
java.lang.String |
getOutboundAddress() |
CompInfo |
getParent() |
java.util.List |
getPropsMissing()
Returns a List of the properties that were reported missing during the processing of this
component.
|
java.util.List |
getPropsUsed()
Returns a List of the properties that were reportedly used during processing of this
component.
|
java.lang.String |
getReceivingAddress() |
java.lang.String |
getRequest() |
java.lang.String |
getResponse() |
java.util.List |
getSqls() |
long |
getStartTime() |
java.lang.String |
getState() |
long |
getTotalExecutionTime() |
int |
getTotalSqlBatchCount() |
int |
getTotalSqlExecCount() |
int |
getTotalSqlExecCount(boolean includeChildren) |
int |
getTotalSqlExecTimeMs() |
java.lang.String |
getTransactionId() |
java.lang.String |
getType() |
java.util.Map |
getUniqueSqls() |
java.lang.String |
getUnqiueId() |
boolean |
isTransFailed()
Useful on the LISA side to determine this simply
|
void |
log(java.lang.String msg)
To raise an EVENT_NODEMSG event on the LISA side with the given message in the long info field
|
void |
notifyContentMissing(java.lang.String contKey)
Content-based applications can use this mechanism to report that a peice of content
was missing.
|
void |
notifyContentUsed(java.lang.String contKey)
This method enables server component authors to declare what content keys were used
in constructing the result given.
|
void |
notifyPropMissing(java.lang.Object propKey)
Enables system under test authors to declare that a needed property was not in session state
during processing of this component.
|
void |
notifyPropUsed(java.lang.String propKey,
java.lang.Object propValue)
This provides a mechanism for system component authors to declare what session state
variables were used during processing.
|
protected static java.util.List |
readIntoList(org.w3c.dom.Element parent,
java.lang.String tag,
java.lang.Class clz) |
void |
readXML(org.w3c.dom.Element e) |
void |
resultSetNext(java.sql.Statement statement,
java.sql.ResultSet rs,
java.lang.String rowAsString)
Take note of the fact that we have iterated over a ResultSet.
|
void |
sendLISATestEvent(int evID,
java.lang.String shortDesc,
java.lang.String longDesc)
Any Lisa test event can be sent via this mechanism.
|
void |
setAgentId(long l) |
protected void |
setAgentName(java.lang.String agentName) |
void |
setBuildStatus(java.lang.String status,
java.lang.String statusMsg)
Enables the system under test to declare its execution or build status to Lisa
explicitly.
|
void |
setBuildTime(long millis)
Deprecated.
Will be removed in a future release.
|
void |
setClassName(java.lang.String className) |
void |
setCompContent(java.lang.String content)
This is how a component can set its content to report to the Lisa.
|
void |
setEndTime(long endTime) |
void |
setException(java.lang.Throwable tw)
Components can explicitly declare that an exception was caught during its processing
and report that exception to Lisa by calling this method.
|
void |
setJvmInfo(JvmInfo jvmInfo)
If a subclass needs to replace our jvminfo
|
void |
setLISAProp(java.lang.String key,
java.lang.Object val)
Server component authors have the ability to set Properties on the Lisa test execution
that is running them.
|
void |
setLISAProp(java.lang.String key,
java.io.Serializable val)
A simple wrapper for setLISAProp(String, Object)
|
void |
setMethod(java.lang.String method) |
void |
setName(java.lang.String name)
Sets the descriptive name of this reporting object
|
void |
setOutboundAddress(java.lang.String outboundAddress) |
void |
setParent(CompInfo parent) |
void |
setReceivingAddress(java.lang.String receivingAddress) |
void |
setRequest(java.lang.String request) |
void |
setResponse(java.lang.String response) |
void |
setStartTime(long startTime) |
void |
setState(java.lang.String state) |
void |
setTotalExecutionTime(long totalExecutionTime) |
void |
setTransactionid(java.lang.String transactionId) |
void |
setType(java.lang.String type) |
void |
setUnqiueId(java.lang.String unqiueId) |
java.lang.String |
toLongString() |
java.lang.String |
toShortString() |
java.lang.String |
toString() |
void |
writeXML(java.io.PrintWriter pw) |
public static final int LISA_NODEMSG_TESTEVENT
public static final java.lang.String STATUS_SUCCESS
public static final java.lang.String STATUS_UNKNOWN
public static final java.lang.String STATUS_INPUTERROR
public static final java.lang.String STATUS_EXTERNALERROR
public static final java.lang.String STATUS_FAILED
public static final java.lang.String STATUS_ALL
public static final java.lang.String STATUS_OK_CODES
public static final java.lang.String STATUS_FAIL_CODES
public static final java.lang.String STATUS_NONFAIL_CODES
public static final java.lang.String TYPE_WS_INBOUND
public static final java.lang.String TYPE_WS_OUTBOUND
public static final java.lang.String TYPE_WS
public static final java.lang.String TYPE_EJB_INBOUND
public static final java.lang.String TYPE_EJB_OUTBOUND
public static final java.lang.String TYPE_EJB
public static final java.lang.String TYPE_JMS_INBOUND
public static final java.lang.String TYPE_JMS_OUTBOUND
public static final java.lang.String TYPE_JMS
public static final java.lang.String TYPE_HTTP_INBOUND
public static final java.lang.String TYPE_HTTP_OUTBOUND
public static final java.lang.String TYPE_HTTP
public static final java.lang.String TYPE_HTTPS
public static final java.lang.String TYPE_REST_HTTP
public static final java.lang.String TYPE_FRAMEWORK
public static final java.lang.String TYPE_WMIS_INBOUND
public static final java.lang.String TYPE_WMIS_OUTBOUND
public static final java.lang.String TYPE_WMIS
public static final java.lang.String TYPE_BW_INBOUND
public static final java.lang.String TYPE_BW_OUTBOUND
public static final java.lang.String TYPE_BW
public static final java.lang.String TYPE_BW_WS
public static final java.lang.String TYPE_WMBROKER_INBOUND
public static final java.lang.String TYPE_WMBROKER_OUTBOUND
public static final java.lang.String TYPE_WMBROKER
public static final java.lang.String TYPE_IBM_MQ
public static final java.lang.String TYPE_IBM_WPS
public static final java.lang.String TYPE_JDBC
public static final java.lang.String TYPE_RMI
public static final java.lang.String TYPE_AGENT_CLIENT
public static final java.lang.String TYPE_UNKNOWN
public static final boolean debug
public java.lang.String method
public LisaCollector()
public LisaCollector(CompInfo parentComp, java.lang.String name, Integrator integrator)
parentComp
- the parent component for this one, can be nullname
- the descriptive name for this componentintegrator
- our integratorpublic LisaCollector(CompInfo parentComp, java.lang.String name)
protected static java.util.List readIntoList(org.w3c.dom.Element parent, java.lang.String tag, java.lang.Class clz)
public void assertFailTrans(boolean expr)
expr
- - sets build status to failed if this expression is falsepublic void assertFailTrans(boolean expr, java.lang.String statusMsg)
expr
- - sets build status to failed if this expression is falsestatusMsg
- - build status message if badpublic void addLogMessage(java.lang.String loggerName, java.lang.String level, java.lang.String message)
public java.lang.String addLoggedSql(LoggedSql loggedSql)
public java.lang.String addSql(java.sql.Statement statement, java.lang.String prepared, java.lang.String sql, long elapsed)
prepared
- the prepared statement as a string with '?' for parameter placeholderssql
- the actual SQL issued with real values instead of placeholderselapsed
- How long did this SQL take?public java.lang.String addSql(java.lang.String connectionInfo, java.sql.Statement statement, java.lang.String prepared, java.lang.String sql, long elapsed)
public java.lang.String addBatch(java.sql.Statement statement, java.lang.String prepared, java.lang.String sql, long execTimeMillis)
prepared
- the prepared statement as a string with '?' for parameter placeholderssql
- the actual SQL issued with real values instead of placeholdersexecTimeMillis
- How long did this SQL take?public java.lang.String addBatch(java.lang.String connectionInfo, java.sql.Statement statement, java.lang.String prepared, java.lang.String sql, long execTimeMillis)
public void resultSetNext(java.sql.Statement statement, java.sql.ResultSet rs, java.lang.String rowAsString)
rowAsString
- the string representation of the rowpublic void addEjbEvent(java.lang.String event)
event
- public void assertLog(boolean expr, java.lang.String logMsg)
expr
- expression that if false will cause Lisa to be given a log messagelogMsg
- the log message to report if the assertion is falsepublic void finished()
public void finished(java.lang.String buildStatus, java.lang.String buildMsg, java.lang.Throwable tw, java.lang.String content)
buildStatus
- send null for this class to query child components and take the worst
as its status. For example, if a child set its status to F, then this build status would be
F. If there are no children or none are set to anything interesting (!S or !U), then we'll
use S for this status.buildMsg
- if the status message has not already been set, we'll set it to thistw
- if the isn't already an Exception registered for this comp, then we'll use this onecontent
- if you have some to share, or null if you don't.public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name you want givenpublic java.util.List<CompInfo> getChildren()
public void setBuildStatus(java.lang.String status, java.lang.String statusMsg)
status
- the code as described abovestatusMsg
- the message to provide detail or explanation to the test case authorpublic java.lang.String getRequest()
public void setRequest(java.lang.String request)
public java.lang.String getResponse()
public void setResponse(java.lang.String response)
public java.lang.String getType()
public void setType(java.lang.String type)
public java.lang.String getBuildStatus()
public java.lang.String getBuildStatusMsg()
public boolean isTransFailed()
public long getBuildTime()
public void setBuildTime(long millis)
millis
- how long the component execution took in millisecondspublic void setCompContent(java.lang.String content)
content
- the content to report to the test casepublic java.lang.String getCompContent()
public long getStartTime()
public long getEndTime()
public void log(java.lang.String msg)
msg
- what you wish to logpublic void sendLISATestEvent(int evID, java.lang.String shortDesc, java.lang.String longDesc)
evID
- - the event ID that should match those in the com.itko.lisa.test.TestEvent class or be a custom event IDshortDesc
- - the short description that will be loggedlongDesc
- - the long description that will be loggedpublic java.util.List getLISATestEvents()
public void setException(java.lang.Throwable tw)
tw
- the exception that was caughtpublic ExceptionInfo getException()
public java.util.List<ExceptionInfo> getExceptionList()
public void setLISAProp(java.lang.String key, java.io.Serializable val)
key
- val
- public void setLISAProp(java.lang.String key, java.lang.Object val)
key
- the key that Lisa will use to look up the given value. Any current value with
the same key will be replaced, so make sure this key is properly scoped. Often people use
the package name or project name as a prefix to all key names.val
- the value you want Lisa to store in the TestExec object calling uspublic java.util.List getLISAProps()
public void notifyContentMissing(java.lang.String contKey)
contKey
- the content key that was missingpublic java.util.List getMissingContent()
public void notifyContentUsed(java.lang.String contKey)
contKey
- the content key used in construction of the outputpublic java.util.List getContentUsed()
public void notifyPropUsed(java.lang.String propKey, java.lang.Object propValue)
propKey
- the session key accessedpropValue
- the value at the time it was usedpublic java.util.List getPropsUsed()
public void notifyPropMissing(java.lang.Object propKey)
propKey
- the key for the object that was expected but missingpublic java.util.List getPropsMissing()
public CompInfo getParent()
public void setParent(CompInfo parent)
public void setJvmInfo(JvmInfo jvmInfo)
jvmInfo
- public java.util.List getLoggedMessages()
LoggedMessage
objects in the order they were capturedpublic java.util.List getEjbEvents()
public java.util.List getSqls()
LoggedSql
objectspublic java.util.List getLoggedSqls()
LoggedSql
objectspublic java.util.Map getUniqueSqls()
UniqueSql
objects used in this transaction. The key is the SQL stringpublic int getTotalSqlExecCount()
public int getTotalSqlExecCount(boolean includeChildren)
public int getTotalSqlBatchCount()
public int getTotalSqlExecTimeMs()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toLongString()
public java.lang.String toShortString()
public void setStartTime(long startTime)
public void setEndTime(long endTime)
public void addChild(CompInfo child)
public java.lang.String getUnqiueId()
public void setUnqiueId(java.lang.String unqiueId)
public java.lang.String getTransactionId()
public void setTransactionid(java.lang.String transactionId)
public java.lang.String getMethod()
public void setMethod(java.lang.String method)
protected java.lang.String getAgentName()
protected void setAgentName(java.lang.String agentName)
public java.lang.String getReceivingAddress()
public void setReceivingAddress(java.lang.String receivingAddress)
public java.lang.String getOutboundAddress()
public void setOutboundAddress(java.lang.String outboundAddress)
public long getAgentId()
public void setAgentId(long l)
public java.lang.String getClassName()
public void setClassName(java.lang.String className)
public long getTotalExecutionTime()
public void setTotalExecutionTime(long totalExecutionTime)
public void setState(java.lang.String state)
public java.lang.String getState()
Copyright © 1998-2014 CA, Inc. All Rights Reserved.