Class NetworkAccessHandler

java.lang.Object
kieker.analysis.generic.source.NetworkAccessHandler
All Implemented Interfaces:
IAccessHandler

public class NetworkAccessHandler extends Object implements 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 Details

    • NetworkAccessHandler

      public NetworkAccessHandler(Collection<String> networkPatterns) throws UnknownHostException
      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

      public boolean acceptRemoteIpAddress(String remoteIpAddress)
      Description copied from interface: IAccessHandler
      Check whether the given IP address is valid to write to the RESt interface.
      Specified by:
      acceptRemoteIpAddress in interface IAccessHandler
      Parameters:
      remoteIpAddress - the remote IP address
      Returns:
      returns true when the address is accepted else false.