Class DefaultPiPipeconf

  • All Implemented Interfaces:
    PiPipeconf

    public final class DefaultPiPipeconf
    extends java.lang.Object
    implements PiPipeconf
    Default pipeconf implementation.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete 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.
      static DefaultPiPipeconf.Builder builder()
      Returns a new pipeconf builder.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • id

        public PiPipeconfId id()
        Description copied from interface: PiPipeconf
        Returns the identifier of this pipeline configuration.
        Specified by:
        id in interface PiPipeconf
        Returns:
        a identifier
      • fingerprint

        public long fingerprint()
        Description copied from interface: PiPipeconf
        Returns the fingerprint of pipeconf.
        Specified by:
        fingerprint in interface PiPipeconf
        Returns:
        a fingerprint
      • behaviours

        public java.util.Collection<java.lang.Class<? extends Behaviour>> behaviours()
        Description copied from interface: PiPipeconf
        Returns all pipeline-specific behaviour interfaces defined by this configuration.
        Specified by:
        behaviours in interface PiPipeconf
        Returns:
        a collection of behaviours
      • implementation

        public java.util.Optional<java.lang.Class<? extends Behaviour>> implementation​(java.lang.Class<? extends Behaviour> behaviour)
        Description copied from interface: PiPipeconf
        Returns the implementation class for the given behaviour, if present.
        Specified by:
        implementation in interface PiPipeconf
        Parameters:
        behaviour - behaviour interface
        Returns:
        implementation class
      • hasBehaviour

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

        public java.util.Optional<java.io.InputStream> extension​(PiPipeconf.ExtensionType type)
        Description copied from interface: PiPipeconf
        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.
        Specified by:
        extension in interface PiPipeconf
        Parameters:
        type - extension type
        Returns:
        extension input stream