public static final class DefaultFlowRule.Builder extends Object implements FlowRule.Builder
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
FlowRule |
build()
Builds a flow rule object.
|
FlowRule.Builder |
forDevice(DeviceId deviceId)
Sets the deviceId for this flow rule.
|
FlowRule.Builder |
forTable(int tableId)
Sets the table id for this flow rule.
|
FlowRule.Builder |
fromApp(ApplicationId appId)
Assigns the application that built this flow rule to this object.
|
FlowRule.Builder |
makePermanent()
Makes this rule permanent on the dataplane.
|
FlowRule.Builder |
makeTemporary(int timeout)
Makes this rule temporary and timeout after the specified amount
of time.
|
FlowRule.Builder |
withCookie(long cookie)
Assigns a cookie value to this flowrule.
|
FlowRule.Builder |
withHardTimeout(int timeout)
Sets hard timeout parameter in flow table.
|
FlowRule.Builder |
withPriority(int priority)
Sets the priority for this flow rule.
|
FlowRule.Builder |
withReason(FlowRule.FlowRemoveReason reason)
Sets reason parameter received from switches .
|
FlowRule.Builder |
withSelector(TrafficSelector selector)
Sets the selector (or match field) for this flow rule.
|
FlowRule.Builder |
withTreatment(TrafficTreatment treatment)
Sets the traffic treatment for this flow rule.
|
public FlowRule.Builder withCookie(long cookie)
FlowRule.BuilderwithCookie in interface FlowRule.Buildercookie - a long valuepublic FlowRule.Builder fromApp(ApplicationId appId)
FlowRule.BuilderfromApp in interface FlowRule.BuilderappId - an application idpublic FlowRule.Builder withPriority(int priority)
FlowRule.BuilderwithPriority in interface FlowRule.Builderpriority - an integerpublic FlowRule.Builder forDevice(DeviceId deviceId)
FlowRule.BuilderforDevice in interface FlowRule.BuilderdeviceId - a device idpublic FlowRule.Builder forTable(int tableId)
FlowRule.BuilderforTable in interface FlowRule.BuildertableId - an integerpublic FlowRule.Builder withSelector(TrafficSelector selector)
FlowRule.BuilderwithSelector in interface FlowRule.Builderselector - a traffic selectorpublic FlowRule.Builder withTreatment(TrafficTreatment treatment)
FlowRule.BuilderwithTreatment in interface FlowRule.Buildertreatment - a traffic treatmentpublic FlowRule.Builder makePermanent()
FlowRule.BuildermakePermanent in interface FlowRule.Builderpublic FlowRule.Builder makeTemporary(int timeout)
FlowRule.BuildermakeTemporary in interface FlowRule.Buildertimeout - an integerpublic FlowRule.Builder withHardTimeout(int timeout)
FlowRule.BuilderwithHardTimeout in interface FlowRule.Buildertimeout - an integerpublic FlowRule.Builder withReason(FlowRule.FlowRemoveReason reason)
FlowRule.BuilderwithReason in interface FlowRule.Builderreason - a shortpublic FlowRule build()
FlowRule.Builderbuild in interface FlowRule.Builder