Class DefaultChannelConfig

    • Field Detail

      • connectTimeoutMillis

        private volatile int connectTimeoutMillis
    • Constructor Detail

      • DefaultChannelConfig

        public DefaultChannelConfig()
    • Method Detail

      • setOptions

        public void setOptions​(java.util.Map<java.lang.String,​java.lang.Object> options)
        Description copied from interface: ChannelConfig
        Sets the configuration properties from the specified Map.
        Specified by:
        setOptions in interface ChannelConfig
      • setOption

        public boolean setOption​(java.lang.String key,
                                 java.lang.Object value)
        Description copied from interface: ChannelConfig
        Sets a configuration property with the specified name and value. To override this method properly, you must call the super class:
         public boolean setOption(String name, Object value) {
             if (super.setOption(name, value)) {
                 return true;
             }
        
             if (name.equals("additionalOption")) {
                 ....
                 return true;
             }
        
             return false;
         }
         
        Specified by:
        setOption in interface ChannelConfig
        Returns:
        true if and only if the property has been set
      • getConnectTimeoutMillis

        public int getConnectTimeoutMillis()
        Description copied from interface: ChannelConfig
        Returns the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.
        Specified by:
        getConnectTimeoutMillis in interface ChannelConfig
        Returns:
        the connect timeout in milliseconds. 0 if disabled.
      • setConnectTimeoutMillis

        public void setConnectTimeoutMillis​(int connectTimeoutMillis)
        Description copied from interface: ChannelConfig
        Sets the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.
        Specified by:
        setConnectTimeoutMillis in interface ChannelConfig
        Parameters:
        connectTimeoutMillis - the connect timeout in milliseconds. 0 to disable.