Class DefaultNextTreatment
- java.lang.Object
-
- org.onosproject.net.flowobjective.DefaultNextTreatment
-
- All Implemented Interfaces:
NextTreatment
public final class DefaultNextTreatment extends Object implements NextTreatment
Represents a next action specified by traffic treatment and weight.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.onosproject.net.flowobjective.NextTreatment
NextTreatment.Type
-
-
Field Summary
-
Fields inherited from interface org.onosproject.net.flowobjective.NextTreatment
DEFAULT_WEIGHT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
hashCode()
static DefaultNextTreatment
of(TrafficTreatment treatment)
Returns an instance of DefaultNextTreatment with given traffic treatment.static DefaultNextTreatment
of(TrafficTreatment treatment, int weight)
Returns an instance of DefaultNextTreatment with given traffic treatment and weight.String
toString()
TrafficTreatment
treatment()
Returns traffic treatment.NextTreatment.Type
type()
Type of this next action.int
weight()
weight of this next action.
-
-
-
Method Detail
-
treatment
public TrafficTreatment treatment()
Returns traffic treatment.- Returns:
- traffic treatment.
-
of
public static DefaultNextTreatment of(TrafficTreatment treatment)
Returns an instance of DefaultNextTreatment with given traffic treatment.- Parameters:
treatment
- traffic treatment- Returns:
- an instance of DefaultNextTreatment
-
of
public static DefaultNextTreatment of(TrafficTreatment treatment, int weight)
Returns an instance of DefaultNextTreatment with given traffic treatment and weight.- Parameters:
treatment
- traffic treatmentweight
- the weight of next treatment- Returns:
- an instance of DefaultNextTreatment
-
weight
public int weight()
Description copied from interface:NextTreatment
weight of this next action.- Specified by:
weight
in interfaceNextTreatment
- Returns:
- weight
-
type
public NextTreatment.Type type()
Description copied from interface:NextTreatment
Type of this next action.- Specified by:
type
in interfaceNextTreatment
- Returns:
- type
-
-