Class RestrictionBase
- java.lang.Object
-
- ch.supertomcat.supertomcatutils.queue.RestrictionBase
-
- All Implemented Interfaces:
Restriction
public abstract class RestrictionBase extends Object implements Restriction
Base class for Restriction
-
-
Field Summary
Fields Modifier and Type Field Description protected intmaxConnectionCountMax Connection Countprotected StringrestrictionKeyRestriction Key
-
Constructor Summary
Constructors Constructor Description RestrictionBase(String restrictionKey, int maxConnectionCount)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMaxConnectionCount()StringgetRestrictionKey()booleanisRestricted()protected voidsetMaxConnectionCount(int maxConnectionCount)Sets the maxConnectionCount
-
-
-
Field Detail
-
restrictionKey
protected final String restrictionKey
Restriction Key
-
maxConnectionCount
protected int maxConnectionCount
Max Connection Count
-
-
Constructor Detail
-
RestrictionBase
public RestrictionBase(String restrictionKey, int maxConnectionCount)
Constructor- Parameters:
restrictionKey- Restriction KeymaxConnectionCount- Max Connection Count
-
-
Method Detail
-
getRestrictionKey
public String getRestrictionKey()
- Specified by:
getRestrictionKeyin interfaceRestriction- Returns:
- Key for restriction
-
getMaxConnectionCount
public int getMaxConnectionCount()
- Specified by:
getMaxConnectionCountin interfaceRestriction- Returns:
- Maximum connection count
-
setMaxConnectionCount
protected void setMaxConnectionCount(int maxConnectionCount)
Sets the maxConnectionCount- Parameters:
maxConnectionCount- maxConnectionCount
-
isRestricted
public boolean isRestricted()
- Specified by:
isRestrictedin interfaceRestriction- Returns:
- True if is restricted, false otherwise
-
-