Class DefaultPiPipeconf

  • All Implemented Interfaces:
    PiPipeconf

    public final class DefaultPiPipeconf
    extends Object
    implements PiPipeconf
    Default pipeconf implementation.
    • 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 Collection<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 Optional<Class<? extends Behaviour>> implementation​(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​(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 Optional<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