java.lang.Object
net.i2p.i2ptunnel.streamr.MultiSource.MSink
Enclosing class:
MultiSource

static class MultiSource.MSinkextends Object
Sink wrapper for multi-source destinations.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Destination the message is forwarded to.
    final int
    Local port the stream arrived on.
    final int
    Local port the stream should be forwarded from.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MSink(Destination dest, int fromPort, int toPort)
    Create a forwarding entry for one destination.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    boolean
    Two sinks are equal when their destination and both ports match.
    int
    Hash by source address and port.
    Returns the source port, destination and destination port as text.

    Methods inherited from class Object

    clone, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • dest

      public final Destination dest
      Destination the message is forwarded to.
    • fromPort

      public final int fromPort
      Local port the stream arrived on.
    • toPort

      public final int toPort
      Local port the stream should be forwarded from.
  • Constructor Details

    • MSink

      public MSink(Destination dest, int fromPort, int toPort)
      Create a forwarding entry for one destination.
      Parameters:
      dest - the destination to forward to
      fromPort - the local port the stream arrived on
      toPort - the local port to forward it from
  • Method Details

    • hashCode

      public int hashCode()
      Hash by source address and port.
      Overrides:
      hashCode in class Object
      Returns:
      whether h code is present
    • equals

      public boolean equals(Object o)
      Two sinks are equal when their destination and both ports match.
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Returns the source port, destination and destination port as text.
      Overrides:
      toString in class Object