public class FirewallConfig
extends java.lang.Object
Constructor and Description |
---|
FirewallConfig(java.util.List<?> rules)
Private Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addHostDomainConcurrencyCounter(int limit)
Adds a rule that limits the number of concurrent requests by request's
host domain.
|
void |
addHostDomainPeriodicCounter(int period,
java.util.concurrent.TimeUnit periodUnit,
int limit)
Adds a rule that limits the number of requests for a given period of time
by request's host domain.
|
void |
addIpAddressesBlackList(java.util.List<java.lang.String> blackList)
Adds a rule that forbids access to the given set of IP addresses.
|
void |
addIpAddressesConcurrencyCounter(int limit)
Adds a rule that restricts access according to the IP address of the
request's client.
|
void |
addIpAddressesPeriodicCounter(int period,
java.util.concurrent.TimeUnit periodUnit,
int limit)
Adds a rule that restricts access by period of time according to the IP
address of the request's client.
|
void |
addIpAddressesWhiteList(java.util.List<java.lang.String> whiteList)
Adds a rule that restricts access to the given set of IP addresses.
|
void |
addRolesConcurrencyCounter(java.util.Map<java.lang.String,java.lang.Integer> limitsPerRole)
|
void |
addRolesConcurrencyCounter(java.util.Map<java.lang.String,java.lang.Integer> limitsPerRole,
int defaultLimit)
|
void |
addRolesPeriodicCounter(int period,
java.util.concurrent.TimeUnit periodUnit,
java.util.Map<java.lang.String,java.lang.Integer> limitsPerRole)
|
void |
addRolesPeriodicCounter(int period,
java.util.concurrent.TimeUnit periodUnit,
java.util.Map<java.lang.String,java.lang.Integer> limitsPerRole,
int defaultLimit)
|
public FirewallConfig(java.util.List<?> rules)
public void addHostDomainConcurrencyCounter(int limit)
limit
- The maximum number of requests allowed by host domain at the
same time.public void addHostDomainPeriodicCounter(int period, java.util.concurrent.TimeUnit periodUnit, int limit)
period
- The period of time.periodUnit
- Period time unit associated to the rule.limit
- The maximum number of requests allowed by host domain for the
given period of time.public void addIpAddressesBlackList(java.util.List<java.lang.String> blackList)
blackList
- The list of rejected IP addresses.public void addIpAddressesConcurrencyCounter(int limit)
limit
- The maximum number of accepted concurrent requests.public void addIpAddressesPeriodicCounter(int period, java.util.concurrent.TimeUnit periodUnit, int limit)
period
- The period of time.periodUnit
- Period time unit associated to the rule.limit
- The maximum number of accepted requests for a period of time.public void addIpAddressesWhiteList(java.util.List<java.lang.String> whiteList)
whiteList
- The list of accepted IP addresses.public void addRolesConcurrencyCounter(java.util.Map<java.lang.String,java.lang.Integer> limitsPerRole)
Role
of the
current authenticated User
. Each role is defined a limit in terms
of concurrent requests, in any other case the access is forbidden.limitsPerRole
- The limit assigned per role's name.public void addRolesConcurrencyCounter(java.util.Map<java.lang.String,java.lang.Integer> limitsPerRole, int defaultLimit)
Role
of the
current authenticated User
. Each role is defined a limit in terms
of concurrent requests, in any other case a default limit is applied.limitsPerRole
- The limit assigned per role's name.defaultLimit
- The limit assigned for any other roles, or for user without
assigned role.public void addRolesPeriodicCounter(int period, java.util.concurrent.TimeUnit periodUnit, java.util.Map<java.lang.String,java.lang.Integer> limitsPerRole)
Role
of the
current authenticated User
. Each role is defined a limit in terms
of requests by period of time, in any other case the access is forbidden.period
- The period of time.periodUnit
- Period time unit associated to the rule.limitsPerRole
- The limit assigned per role's name.public void addRolesPeriodicCounter(int period, java.util.concurrent.TimeUnit periodUnit, java.util.Map<java.lang.String,java.lang.Integer> limitsPerRole, int defaultLimit)
Role
of the
current authenticated User
. Each role is defined a limit in terms
of concurrent requests, in any other case a default limit is applied.period
- The period of time.periodUnit
- Period time unit associated to the rule.limitsPerRole
- The limit assigned per role's name.defaultLimit
- The limit assigned for any other roles, or for user without
assigned role.Copyright © 2005-2020 Restlet.