Package 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 java.lang.Object implements Initializable, UnregisterAware, ComponentStatisticsProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BruteForceLockerBean.BruteForceLockerVHostExtension
static class
BruteForceLockerBean.BruteForceLockerVHostExtensionProvider
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 Description BruteForceLockerBean()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInvalidLogin(XMPPResourceConnection session, java.lang.String ip, BareJID jid)
void
addInvalidLogin(XMPPResourceConnection session, java.lang.String ip, BareJID jid, long currentTime)
void
beforeUnregister()
Method called before bean unregister.boolean
canUserBeDisabled(XMPPResourceConnection session, java.lang.String ip, BareJID jid)
void
clearAll()
void
clearOutdated()
void
clearOutdated(long currentTime)
void
everyHour()
void
everyMinute()
void
everySecond()
static java.lang.String
getClientIp(XMPPResourceConnection session)
void
getStatistics(java.lang.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, java.lang.String ip, BareJID jid)
boolean
isLoginAllowed(XMPPResourceConnection session, java.lang.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
-
-
-
-
Method Detail
-
getClientIp
public static java.lang.String getClientIp(XMPPResourceConnection session)
-
addInvalidLogin
public void addInvalidLogin(XMPPResourceConnection session, java.lang.String ip, BareJID jid)
-
addInvalidLogin
public void addInvalidLogin(XMPPResourceConnection session, java.lang.String ip, BareJID jid, long currentTime)
-
canUserBeDisabled
public boolean canUserBeDisabled(XMPPResourceConnection session, java.lang.String ip, BareJID jid)
-
clearAll
public void clearAll()
-
clearOutdated
public void clearOutdated()
-
clearOutdated
public void clearOutdated(long currentTime)
-
getStatistics
public void getStatistics(java.lang.String compName, StatisticsList list)
- Specified by:
getStatistics
in interfaceStatisticsProviderIfc
-
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 interfaceInitializable
-
isEnabled
public boolean isEnabled(XMPPResourceConnection session)
-
handleStatisticsEmitEvent
@HandleEvent(filter=remote) public void handleStatisticsEmitEvent(BruteForceLockerBean.StatisticsEmitEvent event)
-
isLoginAllowed
public boolean isLoginAllowed(XMPPResourceConnection session, java.lang.String ip, BareJID jid)
-
isLoginAllowed
public boolean isLoginAllowed(XMPPResourceConnection session, java.lang.String ip, BareJID jid, long currentTime)
-
beforeUnregister
public void beforeUnregister()
Description copied from interface:UnregisterAware
Method called before bean unregister.- Specified by:
beforeUnregister
in interfaceUnregisterAware
-
everyHour
public void everyHour()
- Specified by:
everyHour
in interfaceComponentStatisticsProvider
-
everyMinute
public void everyMinute()
- Specified by:
everyMinute
in interfaceComponentStatisticsProvider
-
everySecond
public void everySecond()
- Specified by:
everySecond
in interfaceComponentStatisticsProvider
-
-