Package org.onosproject.net.flow
Class DefaultTrafficTreatment
- java.lang.Object
- 
- org.onosproject.net.flow.DefaultTrafficTreatment
 
- 
- All Implemented Interfaces:
- TrafficTreatment
 
 public final class DefaultTrafficTreatment extends java.lang.Object implements TrafficTreatment Default traffic treatment implementation.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classDefaultTrafficTreatment.BuilderBuilds a list of treatments following the following order.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Instruction>allInstructions()Returns the list of all instructions in the treatment, both immediate and deferred.static TrafficTreatment.Builderbuilder()Returns a new traffic treatment builder.static TrafficTreatment.Builderbuilder(TrafficTreatment treatment)Returns a new traffic treatment builder primed to produce entities patterned after the supplied treatment.booleanclearedDeferred()Whether the deferred treatment instructions will be cleared by the device.java.util.List<Instruction>deferred()Returns the list of treatment instructions that will be applied further down the pipeline.static TrafficTreatmentemptyTreatment()Returns an empty traffic treatment.booleanequals(java.lang.Object obj)inthashCode()java.util.List<Instruction>immediate()Returns the list of treatment instructions that will be applied immediately.Instructions.MeterInstructionmetered()Returns the meter instruction if there is one.java.util.Set<Instructions.MeterInstruction>meters()Returns the meter instructions if there is any.Instructions.StatTriggerInstructionstatTrigger()Returns the stat trigger instruction if there is one.Instructions.TableTypeTransitiontableTransition()Returns the next table in the pipeline.java.lang.StringtoString()Instructions.MetadataInstructionwriteMetadata()Returns the metadata instruction if there is one.
 
- 
- 
- 
Method Detail- 
deferredpublic java.util.List<Instruction> deferred() Description copied from interface:TrafficTreatmentReturns the list of treatment instructions that will be applied further down the pipeline.- Specified by:
- deferredin interface- TrafficTreatment
- Returns:
- list of treatment instructions
 
 - 
immediatepublic java.util.List<Instruction> immediate() Description copied from interface:TrafficTreatmentReturns the list of treatment instructions that will be applied immediately.- Specified by:
- immediatein interface- TrafficTreatment
- Returns:
- list of treatment instructions
 
 - 
allInstructionspublic java.util.List<Instruction> allInstructions() Description copied from interface:TrafficTreatmentReturns the list of all instructions in the treatment, both immediate and deferred.- Specified by:
- allInstructionsin interface- TrafficTreatment
- Returns:
- list of treatment instructions
 
 - 
tableTransitionpublic Instructions.TableTypeTransition tableTransition() Description copied from interface:TrafficTreatmentReturns the next table in the pipeline.- Specified by:
- tableTransitionin interface- TrafficTreatment
- Returns:
- a table transition; may be null.
 
 - 
clearedDeferredpublic boolean clearedDeferred() Description copied from interface:TrafficTreatmentWhether the deferred treatment instructions will be cleared by the device.- Specified by:
- clearedDeferredin interface- TrafficTreatment
- Returns:
- a boolean
 
 - 
writeMetadatapublic Instructions.MetadataInstruction writeMetadata() Description copied from interface:TrafficTreatmentReturns the metadata instruction if there is one.- Specified by:
- writeMetadatain interface- TrafficTreatment
- Returns:
- a metadata instruction that may be null
 
 - 
statTriggerpublic Instructions.StatTriggerInstruction statTrigger() Description copied from interface:TrafficTreatmentReturns the stat trigger instruction if there is one.- Specified by:
- statTriggerin interface- TrafficTreatment
- Returns:
- a stat trigger instruction; may be null.
 
 - 
meteredpublic Instructions.MeterInstruction metered() Description copied from interface:TrafficTreatmentReturns the meter instruction if there is one.- Specified by:
- meteredin interface- TrafficTreatment
- Returns:
- a meter instruction that may be a null.
 
 - 
meterspublic java.util.Set<Instructions.MeterInstruction> meters() Description copied from interface:TrafficTreatmentReturns the meter instructions if there is any.- Specified by:
- metersin interface- TrafficTreatment
- Returns:
- meter instructions that may be an empty set.
 
 - 
builderpublic static TrafficTreatment.Builder builder() Returns a new traffic treatment builder.- Returns:
- traffic treatment builder
 
 - 
emptyTreatmentpublic static TrafficTreatment emptyTreatment() Returns an empty traffic treatment.- Returns:
- empty traffic treatment
 
 - 
builderpublic static TrafficTreatment.Builder builder(TrafficTreatment treatment) Returns a new traffic treatment builder primed to produce entities patterned after the supplied treatment.- Parameters:
- treatment- base treatment
- Returns:
- traffic treatment builder
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-