Class AbstractDatagramSessionConfig

java.lang.Object
org.apache.mina.core.session.AbstractIoSessionConfig
org.apache.mina.transport.socket.AbstractDatagramSessionConfig
All Implemented Interfaces:
IoSessionConfig, DatagramSessionConfig
Direct Known Subclasses:
AprDatagramSession.SessionConfigImpl, DefaultDatagramSessionConfig, NioDatagramSessionConfig

public abstract class AbstractDatagramSessionConfig extends AbstractIoSessionConfig implements DatagramSessionConfig
The Datagram transport session configuration.
  • Field Details

    • closeOnPortUnreachable

      private boolean closeOnPortUnreachable
      Tells if we should close the session if the port is unreachable. Default to true
  • Constructor Details

    • AbstractDatagramSessionConfig

      public AbstractDatagramSessionConfig()
  • Method Details

    • setAll

      public void setAll(IoSessionConfig config)
      Sets all configuration properties retrieved from the specified config.
      Specified by:
      setAll in interface IoSessionConfig
      Overrides:
      setAll in class AbstractIoSessionConfig
      Parameters:
      config - The configuration to use
    • isBroadcastChanged

      protected boolean isBroadcastChanged()
      Returns:
      true if and only if the broadcast property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
    • isReceiveBufferSizeChanged

      protected boolean isReceiveBufferSizeChanged()
      Returns:
      true if and only if the receiveBufferSize property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
    • isReuseAddressChanged

      protected boolean isReuseAddressChanged()
      Returns:
      true if and only if the reuseAddress property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
    • isSendBufferSizeChanged

      protected boolean isSendBufferSizeChanged()
      Returns:
      true if and only if the sendBufferSize property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
    • isTrafficClassChanged

      protected boolean isTrafficClassChanged()
      Returns:
      true if and only if the trafficClass property has been changed by its setter method. The system call related with the property is made only when this method returns true. By default, this method always returns true to simplify implementation of subclasses, but overriding the default behavior is always encouraged.
    • isCloseOnPortUnreachable

      public boolean isCloseOnPortUnreachable()
      If method returns true, it means session should be closed when a PortUnreachableException occurs.
      Specified by:
      isCloseOnPortUnreachable in interface DatagramSessionConfig
      Returns:
      Tells if we should close if the port is unreachable
    • setCloseOnPortUnreachable

      public void setCloseOnPortUnreachable(boolean closeOnPortUnreachable)
      Sets if the session should be closed if an PortUnreachableException occurs.
      Specified by:
      setCloseOnPortUnreachable in interface DatagramSessionConfig
      Parameters:
      closeOnPortUnreachable - true if we should close if the port is unreachable