Class InetAddressedMessage<M>

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

public class InetAddressedMessage<M> extends io.netty.channel.DefaultAddressedEnvelope<M,InetSocketAddress>
A message that wraps another message with an InetSocketAddress.
  • 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 InetAddressedMessage<M> retain()
      Specified by:
      retain in interface io.netty.channel.AddressedEnvelope<M,InetSocketAddress>
      Specified by:
      retain in interface io.netty.util.ReferenceCounted
      Overrides:
      retain in class io.netty.channel.DefaultAddressedEnvelope<M,InetSocketAddress>
    • retain

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

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

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

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

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