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. 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

    Constructors
    Constructor | 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.

  - ### 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 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`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### EPPEncodeDecodeStats

          public EPPEncodeDecodeStats​(EPPMessage aMessage)

      Construct an `EPPEncodeDecodeStats` instance with an `EPPMessage`, which will be used to set the name attribute.
      Parameters:
        `aMessage` - `EPPMessage` being tested

    - #### EPPEncodeDecodeStats

          public EPPEncodeDecodeStats​(java.lang.String aName)

      Construct an `EPPEncodeDecodeStats` 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 concrete `EPPMessage` 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, than `toString` can be called to output the result.

    - #### stopXmlTimer

          public void stopXmlTimer()

      Stops the timer started by `startXmlTimer`. A call to `startXmlTimer` 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 to `startXmlTimer` and `stopXmlTimer`. 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 of `getXmlTotalTime` by `getXmlIterations` 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, than `toString` can be called to output the result.

    - #### stopSerialTimer

          public void stopSerialTimer()

      Stops the timer started by `startSerialTimer`. A call to `startSerialTimer` 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 to `startSerialTimer` and `stopSerialTimer`. 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 of `getSerialTotalTime` by `getSerialIterations` 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 the `EPPEncodeDecodeStats` statistics to a `String` in the expectation that it will be written to an `OutputStream` like `System.out`.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Encode/Decode statistics formatted in a `String`.