Class SocketOptions


  • public abstract class SocketOptions
    extends Object
    Defines common socket configuration options used by KDC communication transports.

    This abstract class provides shared configuration for address reuse, receive and send buffer sizes, and IP traffic class. Transport-specific socket options extend this class to provide additional configuration capabilities.

    Options that are not explicitly configured retain a null value, allowing the underlying socket implementation to use its default settings.

    Applications typically configure socket options using the builders provided by the transport-specific subclasses.

    See Also:
    TcpClientSocketOptions, TcpServerSocketOptions, UdpSocketOptions, MulticastSocketOptions
    • Method Detail

      • getReuseAddress

        public Boolean getReuseAddress()
        Returns the configured address reuse setting.
        Returns:
        the address reuse setting, or null if not explicitly configured
      • hasReuseAddress

        public boolean hasReuseAddress()
        Indicates whether address reuse was explicitly configured.
        Returns:
        true if address reuse was configured, otherwise false
      • getReceiveBufferSize

        public Integer getReceiveBufferSize()
        Returns the configured socket receive buffer size.
        Returns:
        the receive buffer size in bytes, or null if not explicitly configured
      • hasReceiveBufferSize

        public boolean hasReceiveBufferSize()
        Indicates whether the receive buffer size was explicitly configured.
        Returns:
        true if a receive buffer size was configured, otherwise false
      • getSendBufferSize

        public Integer getSendBufferSize()
        Returns the configured socket send buffer size.
        Returns:
        the send buffer size in bytes, or null if not explicitly configured
      • hasSendBufferSize

        public boolean hasSendBufferSize()
        Indicates whether the send buffer size was explicitly configured.
        Returns:
        true if a send buffer size was configured, otherwise false
      • getTrafficClass

        public Integer getTrafficClass()
        Returns the configured IP traffic class.
        Returns:
        the traffic class value from 0 through 255, or null if not configured
      • hasTrafficClass

        public boolean hasTrafficClass()
        Indicates whether the IP traffic class was explicitly configured.
        Returns:
        true if a traffic class was configured, otherwise false