net.i2p.router.transport.udp

## Class PeerTestEvent

- java.lang.Object
- - net.i2p.util.SimpleTimer2.TimedEvent
  - - net.i2p.router.transport.udp.PeerTestEvent

- All Implemented Interfaces:
    Runnable

      class PeerTestEvent
      extends SimpleTimer2.TimedEvent

  Initiate a test (we are Alice)

- - ### Field Summary

    - ### Fields inherited from class net.i2p.util.SimpleTimer2.TimedEvent

      `_state, DEFAULT_FUZZ`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PeerTestEvent(RouterContext ctx, UDPTransport udp, PeerTestManager ptmgr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `forceRunImmediately(boolean isIPv6)` Run within the next 5 seconds at the latest
    `void` | `forceRunSoon(boolean isIPv6)` Run within the next 45 seconds at the latest
    `void` | `forceRunSoon(boolean isIPv6, long delay)` Run within the specified time at the latest
    `void` | `reschedule(long delay)` Just to consolidate the logging
    `void` | `setIsAlive(boolean isAlive)` Caller MUST also call schedule(), reschedule(), forceRunSoon(), or forceRunImmediately()
    `void` | `setLastTested(boolean isIPv6)` Set the last-tested timer to now
    `void` | `timeReached()` Simple interface for events to be queued up and notified on expiration the time requested has been reached (this call should NOT block, otherwise the whole SimpleTimer gets backed up)

    - ### Methods inherited from class net.i2p.util.SimpleTimer2.TimedEvent

      `cancel, forceReschedule, reschedule, run, schedule, setFuzz, toString`

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

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

- - ### Constructor Detail

    - #### PeerTestEvent

          PeerTestEvent(RouterContext ctx,
                        UDPTransport udp,
                        PeerTestManager ptmgr)

  - ### Method Detail

    - #### forceRunImmediately

          public void forceRunImmediately(boolean isIPv6)

      Run within the next 5 seconds at the latest

    - #### forceRunSoon

          public void forceRunSoon(boolean isIPv6)

      Run within the next 45 seconds at the latest

    - #### forceRunSoon

          public void forceRunSoon(boolean isIPv6,
                                   long delay)

      Run within the specified time at the latest

    - #### reschedule

          public void reschedule(long delay)

      Just to consolidate the logging
      Overrides:
        `reschedule` in class `SimpleTimer2.TimedEvent`
      Parameters:
        `delay` - timeout in milliseconds

    - #### setIsAlive

          public void setIsAlive(boolean isAlive)

      Caller MUST also call schedule(), reschedule(), forceRunSoon(), or forceRunImmediately()

    - #### setLastTested

          public void setLastTested(boolean isIPv6)

      Set the last-tested timer to now

    - #### timeReached

          public void timeReached()

      Description copied from class: `SimpleTimer2.TimedEvent`
      Simple interface for events to be queued up and notified on expiration the time requested has been reached (this call should NOT block, otherwise the whole SimpleTimer gets backed up)
      Specified by:
        `timeReached` in class `SimpleTimer2.TimedEvent`