Class RawUnixChannelOption

java.lang.Object
io.netty.util.AbstractConstant<ChannelOption<java.nio.ByteBuffer>>
io.netty.channel.ChannelOption<java.nio.ByteBuffer>
io.netty.channel.unix.UnixChannelOption<java.nio.ByteBuffer>
io.netty.channel.unix.GenericUnixChannelOption<java.nio.ByteBuffer>
io.netty.channel.unix.RawUnixChannelOption
All Implemented Interfaces:
Constant<ChannelOption<java.nio.ByteBuffer>>, java.lang.Comparable<ChannelOption<java.nio.ByteBuffer>>

public final class RawUnixChannelOption extends GenericUnixChannelOption<java.nio.ByteBuffer>
A GenericUnixChannelOption which uses an ByteBuffer as optval. The user is responsible to fill the ByteBuffer in a correct manner, so it works with the and .
  • Field Details

    • length

      private final int length
  • Constructor Details

    • RawUnixChannelOption

      public RawUnixChannelOption(java.lang.String name, int level, int optname, int length)
      Creates a new instance.
      Parameters:
      name - the name that is used.
      level - the level.
      optname - the optname.
      length - the expected length of the optvalue.
  • Method Details

    • length

      public int length()
      The length of the optval.
      Returns:
      the length.
    • validate

      public void validate(java.nio.ByteBuffer value)
      Description copied from class: ChannelOption
      Validate the value which is set for the ChannelOption. Sub-classes may override this for special checks.
      Overrides:
      validate in class ChannelOption<java.nio.ByteBuffer>