java.lang.Object
net.i2p.i2ptunnel.access.FilterFactory

public class FilterFactoryextends Object
Factory for incoming connection filters. Only public class in this package.
  • Constructor Details

    • FilterFactory

      public FilterFactory()
      Constructor. Filters are always built by the static createFilter(I2PAppContext, File) from a definition file, so an instance carries no state.
  • Method Details

    • createFilter

      public static StatefulConnectionFilter createFilter(I2PAppContext context, File definition) throws IOException, InvalidDefinitionException
      Creates an instance of IncomingConnectionFilter based on the definition contained in the given file.
      Parameters:
      context - the app context whose service references the created filter consults
      definition - file containing the filter definition
      Returns:
      the filter built from the parsed definition, ready to filter connections
      Throws:
      IOException - if the definition file cannot be read
      InvalidDefinitionException - if the file does not parse as a filter definition