|
soap tutorial | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectadriani.jws.template.service.GeneralAnalyzer
public abstract class GeneralAnalyzer
This class is used to collect and analyze performance data. Average data are shown between square brackets.
Following data are collected:
Field Summary | |
---|---|
protected int |
calls
Total number of times this service has been invoked. |
protected int |
command
Number calls not executed because the input parameters was a command for the manageService()
method of the ServiceLogic() class. |
protected int |
dao_error
Number of errors not properly handlef during execution of a DBA method. |
protected int |
last_dump
The day of the month of the last automatic dump. |
protected static java.lang.String |
leadingName
Beginning of each logging message produced by this class. |
protected java.util.ArrayList |
list
List of all measured execution times. |
protected static WSLogger |
logger
Retrieving the logger instance to be used for this class (static). |
protected int |
logic_error
Number of errors at the main ServiceLogic level. |
protected int |
macro_error
Number of errors at the intermediate ServiceMacro level. |
protected int |
no_db
Number of calls to the web service failed because there was no database connection. |
protected int |
no_error
Number of calls to the web service ended without problems. |
protected int |
no_record
Number of SQL SELECT query performed with result "NO RECORD". |
protected int |
no_result
Number of times the web service logic found no data at all. |
protected int |
sql_error
Number of SQL statement that generated an SQL error. |
protected int |
sql_query
Number of SQL statement executed without problems. |
protected java.util.Date |
startup
The timestamp of the startup time of the web service (i.e. the time of the first call). |
protected java.util.Hashtable |
table
The hash table tracking all the threads that are collecting results. |
protected int |
validation_error
Number of errors due to an ADBBean exception. |
Constructor Summary | |
---|---|
GeneralAnalyzer()
Standard constructor. |
Method Summary | |
---|---|
void |
addCommand()
Mutator method. |
void |
addDAOError()
Mutator method. |
void |
addLogicError()
Mutator method. |
void |
addMacroError()
Mutator method. |
void |
addNoDatabase()
Mutator method. |
void |
addNoError()
Mutator method. |
void |
addNoRecord()
Mutator method. |
void |
addNoResult()
Mutator method. |
void |
addSQLError()
Mutator method. |
void |
addSQLQuery()
Mutator method. |
void |
addValidationError()
Mutator method. |
void |
collect(int code)
Collect a generic single ServiceDAO event and increment the related counter, using the integer
code values defined in the ErrorMessage class. |
abstract void |
endCall(int code)
Stop the chronwatch after the end of one call service, even if the call generated an error. |
int |
getCalls()
Accessor method. |
int |
getCommand()
Accessor method. |
int |
getDAOError()
Accessor method. |
int |
getLastDump()
Accessor method. |
int |
getLogicError()
Accessor method. |
int |
getMacroError()
Accessor method. |
int |
getNoDatabase()
Mutator method. |
int |
getNoError()
Mutator method. |
int |
getNoRecord()
Accessor method. |
int |
getNoResult()
Accessor method. |
abstract java.lang.StringBuffer |
getResults()
Produce a StringBuffer object containing all the analysis data already formatted and
ready for printing. |
int |
getSQLError()
Accessor method. |
int |
getSQLQuery()
Mutator method. |
java.util.Date |
getStartup()
Accessor method. |
int |
getValidationError()
Accessor method. |
void |
logResults()
Log the analysis results produced by the getResults() method in the LOG file. |
void |
printResults()
Print the analysis results produced by the getResults() method on the standard output. |
void |
setLastDump(int value)
Mutator method. |
void |
startCall()
Start the chronwatch at the beginning of one call service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable table
startCall()
method
before ending the call, we can acknowledge the identity of the caller, in order to match each
endCall()
method with the proper starting time.table.size()
method to acknowledge the number of calls still hanging up.
protected java.util.ArrayList list
protected int calls
protected int no_error
protected int logic_error
ServiceLogic
level.
protected int macro_error
ServiceMacro
level.
protected int validation_error
ADBBean
exception.
protected int no_result
protected int no_db
protected int sql_query
protected int sql_error
protected int no_record
protected int dao_error
protected int command
manageService()
method of the ServiceLogic()
class.
protected java.util.Date startup
protected int last_dump
protected static java.lang.String leadingName
protected static WSLogger logger
Constructor Detail |
---|
public GeneralAnalyzer()
GeneralAnalyzer
class (i.e. without the need to write super()
).Hashtable
that will store the threads references.
Method Detail |
---|
public void collect(int code)
ServiceDAO
event and increment the related counter, using the integer
code values defined in the ErrorMessage
class.
code
- the integer code describing the status of the DBA after executionErrorMessage
public abstract java.lang.StringBuffer getResults()
StringBuffer
object containing all the analysis data already formatted and
ready for printing.
public void printResults()
getResults()
method on the standard output.
getResults()
public void logResults()
getResults()
method in the LOG file.
getResults()
public void startCall()
ServiceLogic
.
public abstract void endCall(int code)
ErrorMessage
class.ServiceLogic
class or by a ServiceMacro
,
depending by the particular "logic branch" executed at run-time.
code
- the integer code describing the event or errorErrorMessage
public void addNoError()
public void addCommand()
public void addLogicError()
public void addValidationError()
public void addNoResult()
public void addNoDatabase()
public void addMacroError()
public void addSQLQuery()
public void addNoRecord()
public void addSQLError()
public void addDAOError()
public void setLastDump(int value)
public int getNoError()
public int getCommand()
public int getLogicError()
public int getValidationError()
public int getNoResult()
public int getNoDatabase()
public int getMacroError()
public int getSQLQuery()
public int getNoRecord()
public int getSQLError()
public int getDAOError()
public int getCalls()
public java.util.Date getStartup()
public int getLastDump()
|
Build 19/03/2014 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |