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 class
DefaultPiPipeconf.Builder
Builder 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.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.
-
-
-
Method Detail
-
id
public PiPipeconfId id()
Description copied from interface:PiPipeconf
Returns the identifier of this pipeline configuration.- Specified by:
id
in interfacePiPipeconf
- Returns:
- a identifier
-
pipelineModel
public PiPipelineModel pipelineModel()
Description copied from interface:PiPipeconf
Returns the pipeline model.- Specified by:
pipelineModel
in interfacePiPipeconf
- Returns:
- a pipeline model
-
fingerprint
public long fingerprint()
Description copied from interface:PiPipeconf
Returns the fingerprint of pipeconf.- Specified by:
fingerprint
in interfacePiPipeconf
- 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 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:PiPipeconf
Returns the implementation class for the given behaviour, if present.- Specified by:
implementation
in interfacePiPipeconf
- 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 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: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 interfacePiPipeconf
- Parameters:
type
- extension type- Returns:
- extension input stream
-
builder
public static DefaultPiPipeconf.Builder builder()
Returns a new pipeconf builder.- Returns:
- pipeconf builder
-
-