Class 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 {@param level} and {@param optname}.
    • Constructor Detail

      • 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.
        length - the expected length of the optvalue.
        optname - the optname.
    • Method Detail

      • 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>