Class NetworkAccessHandler

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

public class NetworkAccessHandler
extends java.lang.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 Summary

    Constructors 
    Constructor Description
    NetworkAccessHandler​(java.util.Collection<java.lang.String> networkPatterns)
    Create network access handler.
  • Method Summary

    Modifier and Type Method Description
    boolean acceptRemoteIpAddress​(java.lang.String remoteIpAddress)
    Check whether the given IP address is valid to write to the RESt interface.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NetworkAccessHandler

      public NetworkAccessHandler​(java.util.Collection<java.lang.String> networkPatterns) throws java.net.UnknownHostException
      Create network access handler.
      Parameters:
      networkPatterns - list of ip/network patterns specifying allowed IP addresses
      Throws:
      java.net.UnknownHostException - if the ip address cannot be resolved
  • Method Details

    • acceptRemoteIpAddress

      public boolean acceptRemoteIpAddress​(java.lang.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.