public class FirewallConfig extends Object
Constructor and Description |
---|
FirewallConfig(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,
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(List<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,
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(List<String> whiteList)
Adds a rule that restricts access to the given set of IP addresses.
|
void |
addRolesConcurrencyCounter(Map<String,Integer> limitsPerRole)
|
void |
addRolesConcurrencyCounter(Map<String,Integer> limitsPerRole,
int defaultLimit)
|
void |
addRolesPeriodicCounter(int period,
TimeUnit periodUnit,
Map<String,Integer> limitsPerRole)
|
void |
addRolesPeriodicCounter(int period,
TimeUnit periodUnit,
Map<String,Integer> limitsPerRole,
int defaultLimit)
|
public FirewallConfig(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, 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(List<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, 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(List<String> whiteList)
whiteList
- The list of accepted IP addresses.public void addRolesConcurrencyCounter(Map<String,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(Map<String,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, TimeUnit periodUnit, Map<String,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, TimeUnit periodUnit, Map<String,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-2016 Restlet.