public class EPPEncodeDecodeStats
extends java.lang.Object
EPPEncodeDecodeStats
capture the statistics related to a single
Encode/Decode Test. An Encode/Decode Test requirements are based on the
EPPCodecTst.testEncodeDecode method. The
EPPCodecTst.testEncodeDecode
method will return an instance of
EPPEncodeDecodeStats
, which provides an interface to select
individual attributes, or can be printed to an output stream with the
toString
method. EPPFactory
is initialized with the set of available EPP Command
Mappings. A method is provided to retrieve the list EPPService
descriptions of available EPP Command Mappings. The list of available EPP
Command Mappings can be used in EPPGreeting
and in
EPPLoginCmd
.Constructor and Description |
---|
EPPEncodeDecodeStats(EPPMessage aMessage)
Construct an
EPPEncodeDecodeStats instance with an
EPPMessage , which will be used to set the name attribute. |
EPPEncodeDecodeStats(java.lang.String aName)
Construct an
EPPEncodeDecodeStats with a specific name name. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Gets the name of the test.
|
long |
getSerialIterations()
Gets the number of Java Serialization test iterations.
|
int |
getSerialSize()
Gets the package size of the Java Serialization packet in bytes.
|
long |
getSerialTotalTime()
Gets the total time to run an Java Serialization test(s) based on the
calls to
startSerialTimer and stopSerialTimer . |
byte[] |
getXmlFormat()
Gets the formatted EPP XML document that can be sent to an OutputStream.
|
long |
getXmlIterations()
Gets the number of XML test iterations.
|
int |
getXmlSize()
Gets the package size of the XML packet in bytes.
|
long |
getXmlTotalTime()
Gets the total time to run an XML test(s) based on the calls to
startXmlTimer and stopXmlTimer . |
boolean |
isXmlValidating()
Is XML validation turned on?
|
void |
setSerialSize(int aSerialSize)
Sets the package size of the Java Serialization packet in bytes.
|
void |
setXmlFormat(byte[] aXmlFormat)
Sets the formatted EPP XML document.
|
void |
setXmlSize(int aXmlSize)
Sets the package size of the XML packet in bytes.
|
void |
startSerialTimer()
Starts the timer for the run of an Java Serialization test.
|
void |
startXmlTimer()
Starts the timer for the run of an XML test.
|
void |
stopSerialTimer()
Stops the timer started by
startSerialTimer . |
void |
stopXmlTimer()
Stops the timer started by
startXmlTimer . |
java.lang.String |
toString()
Format the
EPPEncodeDecodeStats statistics to a
String in the expectation that it will be written to an
OutputStream like System.out . |
public EPPEncodeDecodeStats(EPPMessage aMessage)
EPPEncodeDecodeStats
instance with an
EPPMessage
, which will be used to set the name attribute.aMessage
- EPPMessage
being testedpublic EPPEncodeDecodeStats(java.lang.String aName)
EPPEncodeDecodeStats
with a specific name name.aName
- Name of test.public boolean isXmlValidating()
true
if validation is on; false
otherwise.public java.lang.String getName()
EPPMessage
class name.public void startXmlTimer()
stopXmlTimer
should be called to stop the timer, than toString
can be
called to output the result.public void stopXmlTimer()
startXmlTimer
. A call to
startXmlTimer
should be called prior to this method.public long getXmlTotalTime()
startXmlTimer
and stopXmlTimer
. The total time
is cumlative across multiple iterations of an XML test.public long getXmlIterations()
getXmlTotalTime
by getXmlIterations
will provide
the average time in milliseconds of each iteration.public int getXmlSize()
public void setXmlSize(int aXmlSize)
aXmlSize
- XML packet size in bytes.public byte[] getXmlFormat()
public void setXmlFormat(byte[] aXmlFormat)
aXmlFormat
- Formatted EPP XML documentpublic void startSerialTimer()
stopSerialTimer
should be called to stop the timer, than
toString
can be called to output the result.public void stopSerialTimer()
startSerialTimer
. A call to
startSerialTimer
should be called prior to this method.public long getSerialTotalTime()
startSerialTimer
and stopSerialTimer
.
The total time is cumlative across multiple iterations of a Java
Serialization test.public long getSerialIterations()
getSerialTotalTime
by getSerialIterations
will provide the average time in milliseconds of each iteration.public int getSerialSize()
public void setSerialSize(int aSerialSize)
aSerialSize
- Java Serialization packet size in bytes.public java.lang.String toString()
EPPEncodeDecodeStats
statistics to a
String
in the expectation that it will be written to an
OutputStream
like System.out
.toString
in class java.lang.Object
String
.