Package com.verisign.epp.codec.gen
Class EPPEncodeDecodeStats
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPEncodeDecodeStats
-
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. TheEPPCodecTst.testEncodeDecode
method will return an instance ofEPPEncodeDecodeStats
, which provides an interface to select individual attributes, or can be printed to an output stream with thetoString
method.
EPPFactory
is initialized with the set of available EPP Command Mappings. A method is provided to retrieve the listEPPService
descriptions of available EPP Command Mappings. The list of available EPP Command Mappings can be used inEPPGreeting
and inEPPLoginCmd
.
-
-
Constructor Summary
Constructors Constructor Description EPPEncodeDecodeStats(EPPMessage aMessage)
Construct anEPPEncodeDecodeStats
instance with anEPPMessage
, which will be used to set the name attribute.EPPEncodeDecodeStats(java.lang.String aName)
Construct anEPPEncodeDecodeStats
with a specific name name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 tostartSerialTimer
andstopSerialTimer
.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 tostartXmlTimer
andstopXmlTimer
.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 bystartSerialTimer
.void
stopXmlTimer()
Stops the timer started bystartXmlTimer
.java.lang.String
toString()
Format theEPPEncodeDecodeStats
statistics to aString
in the expectation that it will be written to anOutputStream
likeSystem.out
.
-
-
-
Constructor Detail
-
EPPEncodeDecodeStats
public EPPEncodeDecodeStats(EPPMessage aMessage)
Construct anEPPEncodeDecodeStats
instance with anEPPMessage
, which will be used to set the name attribute.- Parameters:
aMessage
-EPPMessage
being tested
-
EPPEncodeDecodeStats
public EPPEncodeDecodeStats(java.lang.String aName)
Construct anEPPEncodeDecodeStats
with a specific name name.- Parameters:
aName
- Name of test.
-
-
Method Detail
-
isXmlValidating
public boolean isXmlValidating()
Is XML validation turned on?- Returns:
true
if validation is on;false
otherwise.
-
getName
public java.lang.String getName()
Gets the name of the test. This value is either explicitly set or is derived from the concreteEPPMessage
class name.- Returns:
- Name of test.
-
startXmlTimer
public void startXmlTimer()
Starts the timer for the run of an XML test.stopXmlTimer
should be called to stop the timer, thantoString
can be called to output the result.
-
stopXmlTimer
public void stopXmlTimer()
Stops the timer started bystartXmlTimer
. A call tostartXmlTimer
should be called prior to this method.
-
getXmlTotalTime
public long getXmlTotalTime()
Gets the total time to run an XML test(s) based on the calls tostartXmlTimer
andstopXmlTimer
. The total time is cumlative across multiple iterations of an XML test.- Returns:
- Total time to run XML tests in milliseconds.
-
getXmlIterations
public long getXmlIterations()
Gets the number of XML test iterations. Dividing the value ofgetXmlTotalTime
bygetXmlIterations
will provide the average time in milliseconds of each iteration.- Returns:
- Number of XML test iterations.
-
getXmlSize
public int getXmlSize()
Gets the package size of the XML packet in bytes.- Returns:
- XML packet size in bytes.
-
setXmlSize
public void setXmlSize(int aXmlSize)
Sets the package size of the XML packet in bytes.- Parameters:
aXmlSize
- XML packet size in bytes.
-
getXmlFormat
public byte[] getXmlFormat()
Gets the formatted EPP XML document that can be sent to an OutputStream.- Returns:
- Formatted EPP XML document
-
setXmlFormat
public void setXmlFormat(byte[] aXmlFormat)
Sets the formatted EPP XML document.- Parameters:
aXmlFormat
- Formatted EPP XML document
-
startSerialTimer
public void startSerialTimer()
Starts the timer for the run of an Java Serialization test.stopSerialTimer
should be called to stop the timer, thantoString
can be called to output the result.
-
stopSerialTimer
public void stopSerialTimer()
Stops the timer started bystartSerialTimer
. A call tostartSerialTimer
should be called prior to this method.
-
getSerialTotalTime
public long getSerialTotalTime()
Gets the total time to run an Java Serialization test(s) based on the calls tostartSerialTimer
andstopSerialTimer
. The total time is cumlative across multiple iterations of a Java Serialization test.- Returns:
- Total time to run Java Serialization tests in milliseconds.
-
getSerialIterations
public long getSerialIterations()
Gets the number of Java Serialization test iterations. Dividing the value ofgetSerialTotalTime
bygetSerialIterations
will provide the average time in milliseconds of each iteration.- Returns:
- Number of Java Serialization test iterations.
-
getSerialSize
public int getSerialSize()
Gets the package size of the Java Serialization packet in bytes.- Returns:
- Java Serialization packet size in bytes.
-
setSerialSize
public void setSerialSize(int aSerialSize)
Sets the package size of the Java Serialization packet in bytes.- Parameters:
aSerialSize
- Java Serialization packet size in bytes.
-
toString
public java.lang.String toString()
Format theEPPEncodeDecodeStats
statistics to aString
in the expectation that it will be written to anOutputStream
likeSystem.out
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Encode/Decode statistics formatted in a
String
.
-
-