net.i2p.router.tunnel

## Class InboundGatewayReceiver

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

- All Implemented Interfaces:
    TunnelGateway.Receiver

      class InboundGatewayReceiver
      extends Object
      implements TunnelGateway.Receiver

  Handle messages at the IBGW. Not used for zero-hop IBGWs.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InboundGatewayReceiver(RouterContext ctx, HopConfig cfg)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Hash` | `getSendTo()` The next hop
    `long` | `receiveEncrypted(byte[] encrypted)` Take the encrypted data and send it off to the next hop
    `long` | `receiveEncrypted(byte[] encrypted, boolean alreadySearched)`

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

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

- - ### Constructor Detail

    - #### InboundGatewayReceiver

          public InboundGatewayReceiver(RouterContext ctx,
                                        HopConfig cfg)

  - ### Method Detail

    - #### getSendTo

          public Hash getSendTo()

      The next hop
      Specified by:
        `getSendTo` in interface `TunnelGateway.Receiver`
      Returns:
        non-null

    - #### receiveEncrypted

          public long receiveEncrypted(byte[] encrypted)

      Description copied from interface: `TunnelGateway.Receiver`
      Take the encrypted data and send it off to the next hop
      Specified by:
        `receiveEncrypted` in interface `TunnelGateway.Receiver`
      Returns:
        message ID it was sent in, or -1 if it had to be deferred

    - #### receiveEncrypted

          public long receiveEncrypted(byte[] encrypted,
                                       boolean alreadySearched)