net.i2p.router.transport.udp

## Class InboundMessageFragments

- java.lang.Object
- - net.i2p.router.transport.udp.InboundMessageFragments

-     class InboundMessageFragments
      extends Object

  Organize the received data message fragments, feeding completed messages to the `MessageReceiver` and telling the `PeerState` to ACK. In addition, it drops failed fragments and keeps a minimal list of the most recently completed messages (even though higher up in the router we have full blown replay detection, its nice to have a basic line of defense here).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `InboundMessageFragments.ModifiableLong` Modifiable Long, no locking

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InboundMessageFragments(RouterContext ctx, OutboundMessageFragments outbound, UDPTransport transport)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isAlive()`
    `boolean` | `messageReceived(long messageID)` This message was received - SSU 2 only.
    `void` | `shutdown()`
    `void` | `startup()`
    `boolean` | `wasRecentlyReceived(long messageID)` Was this message recently received? SSU 2 only.

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

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

- - ### Constructor Detail

    - #### InboundMessageFragments

          public InboundMessageFragments(RouterContext ctx,
                                         OutboundMessageFragments outbound,
                                         UDPTransport transport)

  - ### Method Detail

    - #### isAlive

          public boolean isAlive()

    - #### messageReceived

          public boolean messageReceived(long messageID)

      This message was received - SSU 2 only. No stats updated here, caller should handle stats.
      Returns:
        true if this message was a duplicate

    - #### shutdown

          public void shutdown()

    - #### startup

          public void startup()

    - #### wasRecentlyReceived

          public boolean wasRecentlyReceived(long messageID)

      Was this message recently received? SSU 2 only. No stats updated here, caller should handle stats.
      Returns:
        true if this message was recently received.