net.i2p.router.tunnel

## Class TunnelParticipant

- java.lang.Object
- - net.i2p.router.tunnel.TunnelParticipant

-     class TunnelParticipant
      extends Object

  Participates in a tunnel at an intermediate hop (not gateway or endpoint). Handles message dispatching, bandwidth throttling, fragment reassembly, and next-hop routing. Optimized for hosting many tunnels efficiently.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) static int` | `DEFAULT_BW_PER_TUNNEL_ESTIMATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TunnelParticipant(RouterContext ctx, HopConfig config, HopProcessor processor)` Construct for intermediate tunnel participant (not endpoint).
    `TunnelParticipant(RouterContext ctx, InboundEndpointProcessor inEndProc)` Construct for inbound tunnel endpoint.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dispatch(TunnelDataMessage msg, Hash recvFrom)` Process an incoming tunnel data message.
    `int` | `getCompleteCount()`
    `int` | `getFailedCount()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### DEFAULT_BW_PER_TUNNEL_ESTIMATE

          static final int DEFAULT_BW_PER_TUNNEL_ESTIMATE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TunnelParticipant

          public TunnelParticipant(RouterContext ctx,
                                   HopConfig config,
                                   HopProcessor processor)

      Construct for intermediate tunnel participant (not endpoint).

    - #### TunnelParticipant

          public TunnelParticipant(RouterContext ctx,
                                   InboundEndpointProcessor inEndProc)

      Construct for inbound tunnel endpoint.

  - ### Method Detail

    - #### dispatch

          public void dispatch(TunnelDataMessage msg,
                               Hash recvFrom)

      Process an incoming tunnel data message.

    - #### getCompleteCount

          public int getCompleteCount()

    - #### getFailedCount

          public int getFailedCount()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`