Package kieker.analysis.generic.source
Class NetworkAccessHandler
java.lang.Object
kieker.analysis.generic.source.NetworkAccessHandler
- All Implemented Interfaces:
IAccessHandler
The network access handler accepts a list of network patterns which it checks
every time acceptRemoteIpAddress is called.
Accepted patterns are: ip-address(/[0-9]+)?
Whereas ip-address can be IPv4 and IPv6.
- Since:
- 2.0.0
- Author:
- Reiner Jung
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkAccessHandler(Collection<String> networkPatterns) Create network access handler. -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptRemoteIpAddress(String remoteIpAddress) Check whether the given IP address is valid to write to the RESt interface.
-
Constructor Details
-
NetworkAccessHandler
Create network access handler.- Parameters:
networkPatterns- list of ip/network patterns specifying allowed IP addresses- Throws:
UnknownHostException- if the ip address cannot be resolved
-
-
Method Details
-
acceptRemoteIpAddress
Description copied from interface:IAccessHandlerCheck whether the given IP address is valid to write to the RESt interface.- Specified by:
acceptRemoteIpAddressin interfaceIAccessHandler- Parameters:
remoteIpAddress- the remote IP address- Returns:
- returns true when the address is accepted else false.
-