Class AbstractIPListPolicy<C>
- java.lang.Object
-
- io.apiman.gateway.engine.policies.AbstractMappedPolicy<C>
-
- io.apiman.gateway.engine.policies.AbstractIPListPolicy<C>
-
- Type Parameters:
C- the config type
- All Implemented Interfaces:
IPolicy
- Direct Known Subclasses:
IPBlacklistPolicy,IPWhitelistPolicy
public abstract class AbstractIPListPolicy<C> extends AbstractMappedPolicy<C>
Base class for the ip whitelist and blacklist policies.- Author:
- eric.wittmann@redhat.com
-
-
Constructor Summary
Constructors Constructor Description AbstractIPListPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetRemoteAddr(ApiRequest request, IPListConfig config)Gets the remote address for comparison.protected booleanisMatch(IPListConfig config, String remoteAddrStr)Returns true if the remote address is a match for the configured values in the IP List.-
Methods inherited from class io.apiman.gateway.engine.policies.AbstractMappedPolicy
apply, apply, doApply, doApply, doProcessFailure, getConfigurationClass, parseConfiguration, processFailure
-
-
-
-
Method Detail
-
getRemoteAddr
protected String getRemoteAddr(ApiRequest request, IPListConfig config)
Gets the remote address for comparison.- Parameters:
request- the requestconfig- the config
-
isMatch
protected boolean isMatch(IPListConfig config, String remoteAddrStr)
Returns true if the remote address is a match for the configured values in the IP List.- Parameters:
config- the configremoteAddrStr- the remote address
-
-