- java.lang.Object
-
- io.netty5.util.AbstractConstant<ChannelOption<T>>
-
- io.netty5.channel.ChannelOption<T>
-
- io.netty5.channel.unix.UnixChannelOption<T>
-
- io.netty5.channel.unix.GenericUnixChannelOption<ByteBuffer>
-
- io.netty5.channel.unix.RawUnixChannelOption
-
- All Implemented Interfaces:
Constant<ChannelOption<ByteBuffer>>
,Comparable<ChannelOption<ByteBuffer>>
public final class RawUnixChannelOption extends GenericUnixChannelOption<ByteBuffer>
AGenericUnixChannelOption
which uses anByteBuffer
asoptval
. The user is responsible to fill theByteBuffer
in a correct manner, so it works with the {@param level} and {@param optname}.
-
-
Field Summary
-
Fields inherited from class io.netty5.channel.unix.UnixChannelOption
DOMAIN_SOCKET_READ_MODE, SO_PEERCRED, SO_REUSEPORT
-
Fields inherited from class io.netty5.channel.ChannelOption
ALLOW_HALF_CLOSURE, AUTO_CLOSE, AUTO_READ, BUFFER_ALLOCATOR, CONNECT_TIMEOUT_MILLIS, DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION, IP_MULTICAST_IF, IP_MULTICAST_LOOP_DISABLED, IP_MULTICAST_TTL, IP_TOS, MAX_MESSAGES_PER_READ, MAX_MESSAGES_PER_WRITE, MESSAGE_SIZE_ESTIMATOR, RCVBUFFER_ALLOCATOR, SO_BACKLOG, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_FASTOPEN, TCP_FASTOPEN_CONNECT, TCP_NODELAY, WRITE_BUFFER_WATER_MARK, WRITE_SPIN_COUNT
-
-
Constructor Summary
Constructors Constructor Description RawUnixChannelOption(String name, int level, int optname, int length)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
length()
The length of the optval.void
validate(ByteBuffer value)
Validate the value which is set for theChannelOption
.-
Methods inherited from class io.netty5.channel.unix.GenericUnixChannelOption
level, optname
-
Methods inherited from class io.netty5.channel.ChannelOption
exists, newInstance, valueOf, valueOf
-
-
-
-
Constructor Detail
-
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.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(ByteBuffer value)
Description copied from class:ChannelOption
Validate the value which is set for theChannelOption
. Sub-classes may override this for special checks.- Overrides:
validate
in classChannelOption<ByteBuffer>
-
-