Interface SimulationSource

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface SimulationSource
    Interface for reading simulation source as a String
    • Method Detail

      • url

        static SimulationSource url​(java.net.URL url)
        Creates a simulation from a URL
        Parameters:
        url - the url of the simulation
        Returns:
        the resource
      • url

        static SimulationSource url​(java.lang.String url)
        Creates a simulation from a URL string
        Parameters:
        url - the url of the simulation
        Returns:
        the resource
      • classpath

        static SimulationSource classpath​(java.lang.String classpath)
        Creates a simulation from the classpath
        Parameters:
        classpath - the classpath of the simulation
        Returns:
        the resource
      • defaultPath

        static SimulationSource defaultPath​(java.lang.String pathString)
        Creates a simulation from the file located in default hoverfly resource path which is relative to src/test/resources/hoverfly
        Parameters:
        pathString - path string relative to the default hoverfly resource path
        Returns:
        the resource
      • file

        static SimulationSource file​(java.nio.file.Path path)
        Creates a simulation from a file
        Parameters:
        path - the file path of the simulation
        Returns:
        the resource
      • simulation

        static SimulationSource simulation​(Simulation simulation)
        Creates a simulation from a Simulation object
        Parameters:
        simulation - the simulation
        Returns:
        the simulation
      • empty

        static SimulationSource empty()
        Creates no simulation
        Returns:
        an empty simulation
      • getSimulation

        java.lang.String getSimulation()