Interface PiPipeconf

  • All Known Implementing Classes:
    DefaultPiPipeconf

    @Beta
    public interface PiPipeconf
    Configuration of a protocol-independent pipeline that includes a pipeline model, a collection of pipeline-specific behaviour implementations, and extensions.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  PiPipeconf.ExtensionType
      Type of extension of a protocol-independent pipeline configuration.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Collection<java.lang.Class<? extends Behaviour>> behaviours()
      Returns all pipeline-specific behaviour interfaces defined by this configuration.
      java.util.Optional<java.io.InputStream> extension​(PiPipeconf.ExtensionType type)
      Returns, if present, an input stream pointing at the beginning of a file representing a device-specific or control protocol-specific extension of this configuration.
      long fingerprint()
      Returns the fingerprint of pipeconf.
      boolean hasBehaviour​(java.lang.Class<? extends Behaviour> behaviourClass)
      Indicates whether or not the pipeconf supports the specified class of behaviour.
      PiPipeconfId id()
      Returns the identifier of this pipeline configuration.
      java.util.Optional<java.lang.Class<? extends Behaviour>> implementation​(java.lang.Class<? extends Behaviour> behaviour)
      Returns the implementation class for the given behaviour, if present.
      PiPipelineModel pipelineModel()
      Returns the pipeline model.
    • Method Detail

      • id

        PiPipeconfId id()
        Returns the identifier of this pipeline configuration.
        Returns:
        a identifier
      • pipelineModel

        PiPipelineModel pipelineModel()
        Returns the pipeline model.
        Returns:
        a pipeline model
      • fingerprint

        long fingerprint()
        Returns the fingerprint of pipeconf.
        Returns:
        a fingerprint
      • behaviours

        java.util.Collection<java.lang.Class<? extends Behaviour>> behaviours()
        Returns all pipeline-specific behaviour interfaces defined by this configuration.
        Returns:
        a collection of behaviours
      • implementation

        java.util.Optional<java.lang.Class<? extends Behaviour>> implementation​(java.lang.Class<? extends Behaviour> behaviour)
        Returns the implementation class for the given behaviour, if present.
        Parameters:
        behaviour - behaviour interface
        Returns:
        implementation class
      • hasBehaviour

        boolean hasBehaviour​(java.lang.Class<? extends Behaviour> behaviourClass)
        Indicates whether or not the pipeconf supports the specified class of behaviour.
        Parameters:
        behaviourClass - behaviour class
        Returns:
        true if behaviour is supported
      • extension

        java.util.Optional<java.io.InputStream> extension​(PiPipeconf.ExtensionType type)
        Returns, if present, an input stream pointing at the beginning of a file representing a device-specific or control protocol-specific extension of this configuration. For example, if requesting a target-specific P4 binary, this will return the same bytes produced by the P4 compiler.
        Parameters:
        type - extension type
        Returns:
        extension input stream