Package org.onosproject.net.pi.model
Class DefaultPiPipeconf
- java.lang.Object
-
- org.onosproject.net.pi.model.DefaultPiPipeconf
-
- All Implemented Interfaces:
PiPipeconf
public final class DefaultPiPipeconf extends java.lang.Object implements PiPipeconf
Default pipeconf implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultPiPipeconf.BuilderBuilder of pipeconf implementations.-
Nested classes/interfaces inherited from interface org.onosproject.net.pi.model.PiPipeconf
PiPipeconf.ExtensionType
-
-
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.Builderbuilder()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.longfingerprint()Returns the fingerprint of pipeconf.booleanhasBehaviour(java.lang.Class<? extends Behaviour> behaviourClass)Indicates whether or not the pipeconf supports the specified class of behaviour.PiPipeconfIdid()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.PiPipelineModelpipelineModel()Returns the pipeline model.
-
-
-
Method Detail
-
id
public PiPipeconfId id()
Description copied from interface:PiPipeconfReturns the identifier of this pipeline configuration.- Specified by:
idin interfacePiPipeconf- Returns:
- a identifier
-
pipelineModel
public PiPipelineModel pipelineModel()
Description copied from interface:PiPipeconfReturns the pipeline model.- Specified by:
pipelineModelin interfacePiPipeconf- Returns:
- a pipeline model
-
fingerprint
public long fingerprint()
Description copied from interface:PiPipeconfReturns the fingerprint of pipeconf.- Specified by:
fingerprintin interfacePiPipeconf- Returns:
- a fingerprint
-
behaviours
public java.util.Collection<java.lang.Class<? extends Behaviour>> behaviours()
Description copied from interface:PiPipeconfReturns all pipeline-specific behaviour interfaces defined by this configuration.- Specified by:
behavioursin interfacePiPipeconf- 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:PiPipeconfReturns the implementation class for the given behaviour, if present.- Specified by:
implementationin interfacePiPipeconf- Parameters:
behaviour- behaviour interface- Returns:
- implementation class
-
hasBehaviour
public boolean hasBehaviour(java.lang.Class<? extends Behaviour> behaviourClass)
Description copied from interface:PiPipeconfIndicates whether or not the pipeconf supports the specified class of behaviour.- Specified by:
hasBehaviourin interfacePiPipeconf- 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:PiPipeconfReturns, 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:
extensionin interfacePiPipeconf- Parameters:
type- extension type- Returns:
- extension input stream
-
builder
public static DefaultPiPipeconf.Builder builder()
Returns a new pipeconf builder.- Returns:
- pipeconf builder
-
-