tigase.auth

## Class BruteForceLockerBean

- java.lang.Object
- - tigase.auth.BruteForceLockerBean

- All Implemented Interfaces:
    Initializable, UnregisterAware, ComponentStatisticsProvider, StatisticsProviderIfc

      @Bean(name="brute-force-locker",
            parent=SessionManager.class,
            active=true)
      public class BruteForceLockerBean
      extends Object
      implements Initializable, UnregisterAware, ComponentStatisticsProvider

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BruteForceLockerBean.Key`
    `static class` | `BruteForceLockerBean.LoginLockedException`
    `static class` | `BruteForceLockerBean.Mode`
    `static class` | `BruteForceLockerBean.StatHolder`
    `static class` | `BruteForceLockerBean.StatisticsEmitEvent`
    `static class` | `BruteForceLockerBean.Value`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BruteForceLockerBean()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addInvalidLogin(XMPPResourceConnection session, String ip, BareJID jid)`
    `void` | `addInvalidLogin(XMPPResourceConnection session, String ip, BareJID jid, long currentTime)`
    `void` | `beforeUnregister()` Method called before bean unregister.
    `boolean` | `canUserBeDisabled(XMPPResourceConnection session, String ip, BareJID jid)`
    `void` | `clearAll()`
    `void` | `clearOutdated()`
    `void` | `clearOutdated(long currentTime)`
    `void` | `everyHour()`
    `void` | `everyMinute()`
    `void` | `everySecond()`
    `static String` | `getClientIp(XMPPResourceConnection session)`
    `void` | `getStatistics(String compName, StatisticsList list)`
    `void` | `handleStatisticsEmitEvent(BruteForceLockerBean.StatisticsEmitEvent event)`
    `void` | `initialize()` Method will be called, when bean will be created, configured and ready to use.
    `boolean` | `isEnabled(XMPPResourceConnection session)`
    `boolean` | `isLoginAllowed(XMPPResourceConnection session, String ip, BareJID jid)`
    `boolean` | `isLoginAllowed(XMPPResourceConnection session, String ip, BareJID jid, long currentTime)`

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

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

    - ### Methods inherited from interface tigase.stats.ComponentStatisticsProvider

      `belongsTo`

- - ### Constructor Detail

    - #### BruteForceLockerBean

          public BruteForceLockerBean()

  - ### Method Detail

    - #### getClientIp

          public static String getClientIp(XMPPResourceConnection session)

    - #### addInvalidLogin

          public void addInvalidLogin(XMPPResourceConnection session,
                                      String ip,
                                      BareJID jid)

    - #### addInvalidLogin

          public void addInvalidLogin(XMPPResourceConnection session,
                                      String ip,
                                      BareJID jid,
                                      long currentTime)

    - #### canUserBeDisabled

          public boolean canUserBeDisabled(XMPPResourceConnection session,
                                           String ip,
                                           BareJID jid)

    - #### clearAll

          public void clearAll()

    - #### clearOutdated

          public void clearOutdated()

    - #### clearOutdated

          public void clearOutdated(long currentTime)

    - #### getStatistics

          public void getStatistics(String compName,
                                    StatisticsList list)

      Specified by:
        `getStatistics` in interface `StatisticsProviderIfc`

    - #### initialize

          public void initialize()

      Description copied from interface: `Initializable`
      Method will be called, when bean will be created, configured and ready to use.
      Specified by:
        `initialize` in interface `Initializable`

    - #### isEnabled

          public boolean isEnabled(XMPPResourceConnection session)

    - #### handleStatisticsEmitEvent

          @HandleEvent(filter=remote)
          public void handleStatisticsEmitEvent(BruteForceLockerBean.StatisticsEmitEvent event)

    - #### isLoginAllowed

          public boolean isLoginAllowed(XMPPResourceConnection session,
                                        String ip,
                                        BareJID jid)

    - #### isLoginAllowed

          public boolean isLoginAllowed(XMPPResourceConnection session,
                                        String ip,
                                        BareJID jid,
                                        long currentTime)

    - #### beforeUnregister

          public void beforeUnregister()

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

    - #### everyHour

          public void everyHour()

      Specified by:
        `everyHour` in interface `ComponentStatisticsProvider`

    - #### everyMinute

          public void everyMinute()

      Specified by:
        `everyMinute` in interface `ComponentStatisticsProvider`

    - #### everySecond

          public void everySecond()

      Specified by:
        `everySecond` in interface `ComponentStatisticsProvider`

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