Package com.verisign.epp.codec.gen
Class EPPEncodeDecodeStats
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPEncodeDecodeStats
-
public class EPPEncodeDecodeStats extends java.lang.ObjectEPPEncodeDecodeStatscapture the statistics related to a single Encode/Decode Test. An Encode/Decode Test requirements are based on the EPPCodecTst.testEncodeDecode method. TheEPPCodecTst.testEncodeDecodemethod will return an instance ofEPPEncodeDecodeStats, which provides an interface to select individual attributes, or can be printed to an output stream with thetoStringmethod.
EPPFactoryis initialized with the set of available EPP Command Mappings. A method is provided to retrieve the listEPPServicedescriptions of available EPP Command Mappings. The list of available EPP Command Mappings can be used inEPPGreetingand inEPPLoginCmd.
-
-
Constructor Summary
Constructors Constructor Description EPPEncodeDecodeStats(EPPMessage aMessage)Construct anEPPEncodeDecodeStatsinstance with anEPPMessage, which will be used to set the name attribute.EPPEncodeDecodeStats(java.lang.String aName)Construct anEPPEncodeDecodeStatswith a specific name name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Gets the name of the test.longgetSerialIterations()Gets the number of Java Serialization test iterations.intgetSerialSize()Gets the package size of the Java Serialization packet in bytes.longgetSerialTotalTime()Gets the total time to run an Java Serialization test(s) based on the calls tostartSerialTimerandstopSerialTimer.byte[]getXmlFormat()Gets the formatted EPP XML document that can be sent to an OutputStream.longgetXmlIterations()Gets the number of XML test iterations.intgetXmlSize()Gets the package size of the XML packet in bytes.longgetXmlTotalTime()Gets the total time to run an XML test(s) based on the calls tostartXmlTimerandstopXmlTimer.booleanisXmlValidating()Is 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.voidstartSerialTimer()Starts the timer for the run of an Java Serialization test.voidstartXmlTimer()Starts the timer for the run of an XML test.voidstopSerialTimer()Stops the timer started bystartSerialTimer.voidstopXmlTimer()Stops the timer started bystartXmlTimer.java.lang.StringtoString()Format theEPPEncodeDecodeStatsstatistics to aStringin the expectation that it will be written to anOutputStreamlikeSystem.out.
-
-
-
Constructor Detail
-
EPPEncodeDecodeStats
public EPPEncodeDecodeStats(EPPMessage aMessage)
Construct anEPPEncodeDecodeStatsinstance with anEPPMessage, which will be used to set the name attribute.- Parameters:
aMessage-EPPMessagebeing tested
-
EPPEncodeDecodeStats
public EPPEncodeDecodeStats(java.lang.String aName)
Construct anEPPEncodeDecodeStatswith a specific name name.- Parameters:
aName- Name of test.
-
-
Method Detail
-
isXmlValidating
public boolean isXmlValidating()
Is XML validation turned on?- Returns:
trueif validation is on;falseotherwise.
-
getName
public java.lang.String 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
public java.lang.String toString()
Format theEPPEncodeDecodeStatsstatistics to aStringin the expectation that it will be written to anOutputStreamlikeSystem.out.- Overrides:
toStringin classjava.lang.Object- Returns:
- Encode/Decode statistics formatted in a
String.
-
-