tigase.server.xmppclient

## Class RegistrationThrottling

- java.lang.Object
- - tigase.server.xmppclient.RegistrationThrottling

- All Implemented Interfaces:
    UnregisterAware

      @Bean(name="registration-throttling",
            parent=Kernel.class,
            active=false,
            exportable=true)
      public class RegistrationThrottling
      extends Object
      implements UnregisterAware

  Created by andrzej on 19.11.2016.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `RegistrationThrottling.CleanUpTask`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ID`
    `protected Integer` | `limit`
    `protected Duration` | `period`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RegistrationThrottling()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beforeUnregister()` Method called before bean unregister.
    `protected boolean` | `checkLimits(XMPPIOService service)`
    `protected boolean` | `checkLimits(XMPPIOService service, Packet packet)`
    `protected void` | `cleanUp(List<Long> registrationTimes)`
    `protected void` | `cleanUpFromTimer()`
    `protected void` | `scheduleCleanUpIfNeeded()`
    `void` | `startFor(Kernel kernel)`
    `void` | `stopFor(Kernel kernel)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ID

          public static final String ID

      See Also:
        Constant Field Values

    - #### limit

          @ConfigField(desc="Limit of allowed account registrations for IP in specified period")
          protected Integer limit

    - #### period

          @ConfigField(desc="Period for which limit is set")
          protected Duration period

  - ### Constructor Detail

    - #### RegistrationThrottling

          public RegistrationThrottling()

  - ### Method Detail

    - #### startFor

          public void startFor(Kernel kernel)

    - #### stopFor

          public void stopFor(Kernel kernel)

    - #### beforeUnregister

          public void beforeUnregister()

      Description copied from interface: `UnregisterAware`
      Method called before bean unregister.
      Specified by:
        `beforeUnregister` in interface `UnregisterAware`

    - #### checkLimits

          protected boolean checkLimits(XMPPIOService service)

    - #### checkLimits

          protected boolean checkLimits(XMPPIOService service,
                                        Packet packet)

    - #### cleanUp

          protected void cleanUp(List<Long> registrationTimes)

    - #### cleanUpFromTimer

          protected void cleanUpFromTimer()

    - #### scheduleCleanUpIfNeeded

          protected void scheduleCleanUpIfNeeded()

Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.