Home / Class/ RawUnixChannelOption Class — netty Architecture

RawUnixChannelOption Class — netty Architecture

Architecture documentation for the RawUnixChannelOption class in RawUnixChannelOption.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  63fc561f_89f3_2458_8256_6f16838964b4["RawUnixChannelOption"]
  a3b6baab_a749_4de6_e6aa_a28d9e78e4a9["RawUnixChannelOption.java"]
  63fc561f_89f3_2458_8256_6f16838964b4 -->|defined in| a3b6baab_a749_4de6_e6aa_a28d9e78e4a9
  596c974b_48b3_74f2_a746_fb32ea1a7766["RawUnixChannelOption()"]
  63fc561f_89f3_2458_8256_6f16838964b4 -->|method| 596c974b_48b3_74f2_a746_fb32ea1a7766
  b75b28a4_310a_2e51_efa3_87854f792728["length()"]
  63fc561f_89f3_2458_8256_6f16838964b4 -->|method| b75b28a4_310a_2e51_efa3_87854f792728
  ac69958f_1ff7_d0bd_98f6_baf39c389071["validate()"]
  63fc561f_89f3_2458_8256_6f16838964b4 -->|method| ac69958f_1ff7_d0bd_98f6_baf39c389071

Relationship Graph

Source Code

transport-native-unix-common/src/main/java/io/netty/channel/unix/RawUnixChannelOption.java lines 27–61

public final class RawUnixChannelOption extends GenericUnixChannelOption<ByteBuffer> {

    private final int length;

    /**
     * Creates a new instance.
     *
     * @param name      the name that is used.
     * @param level     the level.
     * @param length    the expected length of the optvalue.
     * @param optname   the optname.
     */
    public RawUnixChannelOption(String name, int level, int optname, int length) {
        super(name, level, optname);
        this.length = ObjectUtil.checkPositive(length, "length");
    }

    /**
     * The length of the optval.
     *
     * @return the length.
     */
    public int length() {
        return length;
    }

    @Override
    public void validate(ByteBuffer value) {
        super.validate(value);
        if (value.remaining() != length) {
            throw new IllegalArgumentException("Length of value does not match. Expected "
                    + length + ", but got " + value.remaining());
        }
    }
}

Frequently Asked Questions

What is the RawUnixChannelOption class?
RawUnixChannelOption is a class in the netty codebase, defined in transport-native-unix-common/src/main/java/io/netty/channel/unix/RawUnixChannelOption.java.
Where is RawUnixChannelOption defined?
RawUnixChannelOption is defined in transport-native-unix-common/src/main/java/io/netty/channel/unix/RawUnixChannelOption.java at line 27.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free