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.
    • 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

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

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

        boolean hasBehaviour​(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

        Optional<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