Class IPAuthorizationServiceDescriptor

  • All Implemented Interfaces:
    com.jscape.util.db.IntVersioned, java.io.Serializable

    public class IPAuthorizationServiceDescriptor
    extends ServiceDescriptor
    IP authorization service descriptor. The service described by this descriptor takes responsibility for blocking IP if too many invalid authentication attempts appear.
    Author:
    Alex Usun
    See Also:
    Serialized Form
    • Constructor Detail

      • IPAuthorizationServiceDescriptor

        public IPAuthorizationServiceDescriptor​(int maxAttempts,
                                                long maxTimeout,
                                                long restoringTimeout)
        Creates a new descriptor instance.
        Parameters:
        maxAttempts - max authentication attempts
        maxTimeout - authentication timeout in ms
        restoringTimeout - restoring timeout in ms
      • IPAuthorizationServiceDescriptor

        public IPAuthorizationServiceDescriptor()
        This constructor is used by serialization sub-system and is not intended to use directly in client code.
    • Method Detail

      • getMaxAttempts

        public int getMaxAttempts()
        Returns max authentication attempts value.
        Returns:
        max authentication attempts value
      • setMaxAttempts

        public void setMaxAttempts​(int value)
        Sets max authentication attempts value.
        Parameters:
        value - max authentication attempts value
      • getMaxTimeout

        public long getMaxTimeout()
        Returns authentication attempts timeout.
        Returns:
        authentication attempts timeout in ms
      • setMaxTimeout

        public void setMaxTimeout​(long value)
        Sets authentication attempts timeout.
        Parameters:
        value - authentication attempts timeout in ms
      • getRestoringTimeout

        public long getRestoringTimeout()
        Returns account restoring timeout.
        Returns:
        account restoring timeout in ms
      • setRestoringTimeout

        public void setRestoringTimeout​(long value)
        Sets account restoring timeout.
        Parameters:
        value - account restoring timeut in ms
      • attemptLimit

        public com.jscape.inet.mftserver.operation.connection.AttemptLimit attemptLimit()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object