Class OverlayAddressedMessage<M>

java.lang.Object
io.netty.channel.DefaultAddressedEnvelope<M,DrasylAddress>
org.drasyl.channel.OverlayAddressedMessage<M>
Type Parameters:
M - the type of the wrapped message
All Implemented Interfaces:
io.netty.channel.AddressedEnvelope<M,DrasylAddress>, io.netty.util.ReferenceCounted

public class OverlayAddressedMessage<M> extends io.netty.channel.DefaultAddressedEnvelope<M,DrasylAddress>
A message that wraps another message with a DrasylAddress.
  • Constructor Details

  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • retain

      public OverlayAddressedMessage<M> retain()
      Specified by:
      retain in interface io.netty.channel.AddressedEnvelope<M,DrasylAddress>
      Specified by:
      retain in interface io.netty.util.ReferenceCounted
      Overrides:
      retain in class io.netty.channel.DefaultAddressedEnvelope<M,DrasylAddress>
    • retain

      public OverlayAddressedMessage<M> retain(int increment)
      Specified by:
      retain in interface io.netty.channel.AddressedEnvelope<M,DrasylAddress>
      Specified by:
      retain in interface io.netty.util.ReferenceCounted
      Overrides:
      retain in class io.netty.channel.DefaultAddressedEnvelope<M,DrasylAddress>
    • touch

      public OverlayAddressedMessage<M> touch()
      Specified by:
      touch in interface io.netty.channel.AddressedEnvelope<M,DrasylAddress>
      Specified by:
      touch in interface io.netty.util.ReferenceCounted
      Overrides:
      touch in class io.netty.channel.DefaultAddressedEnvelope<M,DrasylAddress>
    • touch

      public OverlayAddressedMessage<M> touch(Object hint)
      Specified by:
      touch in interface io.netty.channel.AddressedEnvelope<M,DrasylAddress>
      Specified by:
      touch in interface io.netty.util.ReferenceCounted
      Overrides:
      touch in class io.netty.channel.DefaultAddressedEnvelope<M,DrasylAddress>
    • resolve

      public InetAddressedMessage<M> resolve(InetSocketAddress address)
      Returns a copy of this message with newRecipient as the new DefaultAddressedEnvelope.recipient().
    • replace

      public <N> OverlayAddressedMessage<N> replace(N newContent)
      Returns a copy of this message with newContent as the new DefaultAddressedEnvelope.content().