Class RawUnixChannelOption

All Implemented Interfaces:
Constant<ChannelOption<ByteBuffer>>, Comparable<ChannelOption<ByteBuffer>>

public final class RawUnixChannelOption extends GenericUnixChannelOption<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(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(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<ByteBuffer>