@Bean(name="registration-throttling", parent=Kernel.class, active=false, exportable=true) public class RegistrationThrottling extends Object implements UnregisterAware
Modifier and Type | Class and Description |
---|---|
protected class |
RegistrationThrottling.CleanUpTask |
Modifier and Type | Field and Description |
---|---|
static String |
ID |
protected Integer |
limit |
protected Duration |
period |
Constructor and Description |
---|
RegistrationThrottling() |
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) |
public static final String ID
@ConfigField(desc="Limit of allowed account registrations for IP in specified period") protected Integer limit
@ConfigField(desc="Period for which limit is set") protected Duration period
public void startFor(Kernel kernel)
public void stopFor(Kernel kernel)
public void beforeUnregister()
UnregisterAware
beforeUnregister
in interface UnregisterAware
protected boolean checkLimits(XMPPIOService service)
protected boolean checkLimits(XMPPIOService service, Packet packet)
protected void cleanUpFromTimer()
protected void scheduleCleanUpIfNeeded()
Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.