com.jscape.inet.mft.audit.reporting.metricses

## Class TopHosts

- java.lang.Object
- - com.jscape.inet.mft.audit.reporting.metricses.TopHosts

- All Implemented Interfaces:
    Metrics<TopHosts.Visitor>, com.jscape.util.Copyable<Metrics>, com.jscape.util.Visitable<TopHosts.Visitor>

      public class TopHosts
      extends java.lang.Object
      implements Metrics<TopHosts.Visitor>

  Top hosts sessions statistics.
  Author:
    Alex Usun

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `TopHosts.Visitor`

    - ### Nested classes/interfaces inherited from interface com.jscape.util.Visitable

      `com.jscape.util.Visitable.VisitorBase, com.jscape.util.Visitable.VisitorException`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TopHosts()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `accept(TopHosts.Visitor visitor)` Backwards dispatching entry point.
    `TopHosts` | `copy()`
    `boolean` | `equals(java.lang.Object o)`
    `NamedEntry[]` | `getEntries()`
    `java.lang.String[]` | `getHosts()` Returns host names.
    `long` | `getSessionCount(java.lang.String hostAddress)` Returns host sessions count.
    `void` | `reset()` Resets metrics data.
    `void` | `setEntries(NamedEntry[] value)`
    `java.lang.String` | `toString()`
    `void` | `update(Report report, com.jscape.inet.mft.LogRecord record)` Updates metrics with log record.

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

      `getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TopHosts

          public TopHosts()

  - ### Method Detail

    - #### update

          public void update(Report report,
                             com.jscape.inet.mft.LogRecord record)

      Description copied from interface: `Metrics`
      Updates metrics with log record.
      Specified by:
        `update` in interface `Metrics<TopHosts.Visitor>`
      Parameters:
        `report` - report instance
        `record` - log record

    - #### reset

          public void reset()

      Description copied from interface: `Metrics`
      Resets metrics data.
      Specified by:
        `reset` in interface `Metrics<TopHosts.Visitor>`

    - #### copy

          public TopHosts copy()

      Specified by:
        `copy` in interface `com.jscape.util.Copyable<Metrics>`

    - #### accept

          public java.lang.Object accept(TopHosts.Visitor visitor)
                                  throws com.jscape.util.Visitable.VisitorException

      Description copied from interface: `com.jscape.util.Visitable`
      Backwards dispatching entry point.
      Specified by:
        `accept` in interface `com.jscape.util.Visitable<TopHosts.Visitor>`
      Parameters:
        `visitor` - a visitor instance
      Returns:
        a visit result if any
      Throws:
        `com.jscape.util.Visitable.VisitorException` - if an error occurs

    - #### getEntries

          public NamedEntry[] getEntries()

    - #### setEntries

          public void setEntries(NamedEntry[] value)

    - #### getHosts

          public java.lang.String[] getHosts()

      Returns host names.
      Returns:
        host names

    - #### getSessionCount

          public long getSessionCount(java.lang.String hostAddress)

      Returns host sessions count.
      Parameters:
        `hostAddress` - hostname/IP
      Returns:
        host sessions count

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © JSCAPE LLC. 1999-2020. All Rights Reserved