Package com.verisign.epp.codec.gen
Class EPPEncodeDecodeStats
java.lang.Object
com.verisign.epp.codec.gen.EPPEncodeDecodeStats
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 Summary
ConstructorsConstructorDescriptionEPPEncodeDecodeStats(EPPMessage aMessage) Construct anEPPEncodeDecodeStatsinstance with anEPPMessage, which will be used to set the name attribute.EPPEncodeDecodeStats(String aName) Construct anEPPEncodeDecodeStatswith a specific name name. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the name of the test.longGets the number of Java Serialization test iterations.intGets the package size of the Java Serialization packet in bytes.longGets the total time to run an Java Serialization test(s) based on the calls tostartSerialTimerandstopSerialTimer.byte[]Gets the formatted EPP XML document that can be sent to an OutputStream.longGets the number of XML test iterations.intGets the package size of the XML packet in bytes.longGets the total time to run an XML test(s) based on the calls tostartXmlTimerandstopXmlTimer.booleanIs XML validation turned on?voidsetSerialSize(int aSerialSize) Sets the package size of the Java Serialization packet in bytes.voidsetXmlFormat(byte[] aXmlFormat) Sets the formatted EPP XML document.voidsetXmlSize(int aXmlSize) Sets the package size of the XML packet in bytes.voidStarts the timer for the run of an Java Serialization test.voidStarts the timer for the run of an XML test.voidStops the timer started bystartSerialTimer.voidStops the timer started bystartXmlTimer.toString()Format theEPPEncodeDecodeStatsstatistics to aStringin the expectation that it will be written to anOutputStreamlikeSystem.out.
-
Constructor Details
-
EPPEncodeDecodeStats
Construct anEPPEncodeDecodeStatsinstance with anEPPMessage, which will be used to set the name attribute.- Parameters:
aMessage-EPPMessagebeing tested
-
EPPEncodeDecodeStats
Construct anEPPEncodeDecodeStatswith a specific name name.- Parameters:
aName- Name of test.
-
-
Method Details
-
isXmlValidating
public boolean isXmlValidating()Is XML validation turned on?- Returns:
trueif validation is on;falseotherwise.
-
getName
Gets the name of the test. This value is either explicitly set or is derived from the concreteEPPMessageclass name.- Returns:
- Name of test.
-
startXmlTimer
public void startXmlTimer()Starts the timer for the run of an XML test.stopXmlTimershould be called to stop the timer, thantoStringcan be called to output the result. -
stopXmlTimer
public void stopXmlTimer()Stops the timer started bystartXmlTimer. A call tostartXmlTimershould be called prior to this method. -
getXmlTotalTime
public long getXmlTotalTime()Gets the total time to run an XML test(s) based on the calls tostartXmlTimerandstopXmlTimer. 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 ofgetXmlTotalTimebygetXmlIterationswill 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.stopSerialTimershould be called to stop the timer, thantoStringcan be called to output the result. -
stopSerialTimer
public void stopSerialTimer()Stops the timer started bystartSerialTimer. A call tostartSerialTimershould 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 tostartSerialTimerandstopSerialTimer. 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 ofgetSerialTotalTimebygetSerialIterationswill 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
Format theEPPEncodeDecodeStatsstatistics to aStringin the expectation that it will be written to anOutputStreamlikeSystem.out.
-